Skip to content

Commit 54835c3

Browse files
Update setup.cfg
1 parent 179467c commit 54835c3

File tree

1 file changed

+198
-0
lines changed

1 file changed

+198
-0
lines changed

setup.cfg

Lines changed: 198 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,199 @@
1+
[metadata]
2+
name = caltechdata_api
3+
version = 1.9.1
4+
author = Thomas E Morrell, Bhattarai Rohan , Won Elizabeth, Alexander A Abakah
5+
6+
license = https://data.caltech.edu/license
7+
description = Python wrapper for CaltechDATA API.
8+
url = https://github.com/caltechlibrary/caltechdata_api
9+
long_description =
10+
# setuptools-py2cfg
111

12+
<p>
13+
<a href="https://pypi.python.org/pypi/setuptools-py2cfg"><img alt="pypi version" src="https://img.shields.io/pypi/v/setuptools-py2cfg.svg"></a>
14+
<a href="https://github.com/gvalkov/setuptools-py2cfg/actions/workflows/tox.yml?query=branch:main"><img alt="Build status" src="https://img.shields.io/github/actions/workflow/status/gvalkov/setuptools-py2cfg/tox.yml?branch=main"></a>
15+
<a href="https://github.com/gvalkov/setuptools-py2cfg/blob/main/LICENSE.txt"><img alt="License" src="https://img.shields.io/pypi/l/setuptools-py2cfg"></a>
16+
</p>
17+
18+
19+
Since version 30.3.0, [setuptools supports] declarative configuration through
20+
the `setup.cfg` file. This script helps convert existing `setup.py` files to
21+
`setup.cfg` in the format expected by setuptools.
22+
23+
A `setup.cfg` file may be migrated to `pyproject.toml` with the help of
24+
[`ini2toml`](https://pypi.org/project/ini2toml) and
25+
[`validate-pyproject`](https://github.com/abravalheri/validate-pyproject).
26+
27+
28+
## Usage
29+
30+
Just point `setuptools-py2cfg` to a `setup.py` file or run it in a directory
31+
containing `setup.py`. For example, given the following `setup.py`:
32+
33+
``` python
34+
from setuptools import setup, find_packages
35+
36+
classifiers = [
37+
'Development Status :: 5 - Production/Stable',
38+
'Programming Language :: Python :: 2.7',
39+
'Programming Language :: Python :: 3',
40+
'Programming Language :: Python :: 3.3',
41+
'Programming Language :: Python :: 3.4',
42+
'Programming Language :: Python :: 3.5',
43+
'Programming Language :: Python :: 3.6',
44+
'Intended Audience :: Developers',
45+
'Topic :: Software Development :: Libraries',
46+
'License :: OSI Approved :: BSD License',
47+
]
48+
49+
extras_require = {
50+
'tests': [
51+
'tox >= 2.6.0',
52+
'pytest >= 3.0.3',
53+
],
54+
'devel': [
55+
'check-manifest >= 0.35',
56+
'readme-renderer >= 16.0',
57+
]
58+
}
59+
60+
kw = {
61+
'name': 'ansimarkup',
62+
'version': '1.3.0',
63+
64+
'description': 'Produce colored terminal text with an xml-like markup',
65+
'long_description': open('README.rst').read(),
66+
67+
'author': 'Georgi Valkov',
68+
'author_email': '[email protected]',
69+
'license': 'Revised BSD License',
70+
'keywords': 'ansi terminal markup',
71+
'url': 'https://github.com/gvalkov/python-ansimarkup',
72+
'classifiers': classifiers,
73+
'install_requires': 'colorama',
74+
'extras_require': extras_require,
75+
'packages': find_packages(),
76+
'zip_safe': True,
77+
}
78+
79+
if __name__ == '__main__':
80+
setup(**kw)
81+
```
82+
83+
Running `setuptools-py2cfg.py` would print:
84+
85+
``` ini
86+
[metadata]
87+
name = ansimarkup
88+
version = 1.3.0
89+
author = Georgi Valkov
90+
author_email = [email protected]
91+
license = Revised BSD License
92+
description = Produce colored terminal text with an xml-like markup
93+
keywords = ansi, terminal, markup
94+
url = https://github.com/gvalkov/python-ansimarkup
95+
long_description = file: README.rst
96+
classifiers =
97+
Development Status :: 5 - Production/Stable
98+
Programming Language :: Python :: 2.7
99+
Programming Language :: Python :: 3
100+
Programming Language :: Python :: 3.3
101+
Programming Language :: Python :: 3.4
102+
Programming Language :: Python :: 3.5
103+
Programming Language :: Python :: 3.6
104+
Intended Audience :: Developers
105+
Topic :: Software Development :: Libraries
106+
License :: OSI Approved :: BSD License
107+
108+
[options]
109+
packages = find:
110+
zip_safe = True
111+
install_requires = colorama
112+
113+
[options.extras_require]
114+
tests =
115+
tox >= 2.6.0
116+
pytest >= 3.0.3
117+
devel =
118+
check-manifest >= 0.35
119+
readme-renderer >= 16.0
120+
```
121+
122+
There are several non-essential options that control the format of the
123+
generated ini-file:
124+
125+
usage: setuptools-py2cfg.py [-h] [-t int] [-i int] [-a] [path]
126+
127+
converts an existing setup.py file to a setup.cfg in the format expected by
128+
setuptools
129+
130+
positional arguments:
131+
path path to setup.py file (default: ./setup.py)
132+
133+
optional arguments:
134+
-h, --help show this help message and exit
135+
-t int, --dangling-list-threshold int
136+
lists longer than this many characters are converted
137+
to a dangling list (default: 40)
138+
-i int, --dangling-list-indent int
139+
number of spaces to use when indenting dangling lists
140+
(default: 4)
141+
-a, --always-use-dangling-lists
142+
use dangling lists everywhere (default: False)
143+
144+
Keep in mind that a `setup.py` file with a single call to `setuptools.setup()`
145+
is still needed after migrating all metadata to `setup.cfg`.
146+
147+
## Installation
148+
149+
The latest stable version of setuptools-py2cfg can be installed from
150+
pypi:
151+
152+
``` bash
153+
$ pip install setuptools-py2cfg
154+
```
155+
156+
## Todo
157+
158+
- Handle `entry_scripts` in ini-format.
159+
- Write a test or two.
160+
161+
## License
162+
163+
Released under the terms of the [Revised BSD License].
164+
165+
[setuptools supports]: https://setuptools.readthedocs.io/en/latest/userguide/declarative_config.html
166+
[Revised BSD License]: https://raw.github.com/gvalkov/setuptools-py2cfg/master/LICENSE
167+
168+
long_description_content_type = text/markdown
169+
classifiers =
170+
License :: OSI Approved :: BSD License
171+
Programming Language :: Python
172+
Programming Language :: Python :: 3
173+
Programming Language :: Python :: 3.7
174+
Programming Language :: Python :: Implementation :: CPython
175+
Programming Language :: Python :: Implementation :: PyPy
176+
177+
[options]
178+
packages = find:
179+
install_requires =
180+
requests
181+
datacite>1.1.0
182+
tqdm>=4.62.3
183+
pyyaml
184+
s3fs
185+
cryptography
186+
s3cmd
187+
include_package_data = True
188+
python_requires = >=3.6.0
189+
190+
[options.packages.find]
191+
exclude = tests
192+
193+
[options.entry_points]
194+
console_scripts = caltechdata_api=caltechdata_api.cli:main
195+
196+
[options.extras_require]
197+
198+
[options.package_data]
199+
caltechdata_api = vocabularies/; vocabularies.yaml

0 commit comments

Comments
 (0)