|
| 1 | +import os |
1 | 2 | from setuptools import setup
|
2 |
| -from io import open |
3 |
| -from kaitaistruct import __version__ |
| 3 | +from setuptools.config import read_configuration |
4 | 4 |
|
5 |
| -with open('README.rst', encoding='utf-8') as f: |
6 |
| - long_description = f.read() |
| 5 | +this_dir = os.path.dirname(__file__) |
| 6 | +cfg = read_configuration(os.path.join(this_dir, 'setup.cfg')) |
| 7 | +#print(cfg) |
| 8 | +cfg["options"].update(cfg["metadata"]) |
| 9 | +cfg = cfg["options"] |
7 | 10 |
|
8 |
| -setup( |
9 |
| - name='kaitaistruct', |
10 |
| - version=__version__, |
11 |
| - description='Kaitai Struct declarative parser generator for binary data: runtime library for Python', |
12 |
| - long_description=long_description, |
13 |
| - url='http://kaitai.io', |
14 |
| - author='Kaitai Project', |
15 |
| - |
16 |
| - license='MIT', |
17 |
| - # See https://pypi.python.org/pypi?%3Aaction=list_classifiers |
18 |
| - classifiers=[ |
19 |
| - # How mature is this project? Common values are |
20 |
| - # 3 - Alpha |
21 |
| - # 4 - Beta |
22 |
| - # 5 - Production/Stable |
23 |
| - 'Development Status :: 4 - Beta', |
24 |
| - |
25 |
| - # Indicate who your project is intended for |
26 |
| - 'Intended Audience :: Developers', |
27 |
| - 'Topic :: Software Development :: Build Tools', |
28 |
| - |
29 |
| - # Pick your license as you wish (should match "license" above) |
30 |
| - 'License :: OSI Approved :: MIT License', |
31 |
| - |
32 |
| - # Specify the Python versions you support here. In particular, ensure |
33 |
| - # that you indicate whether you support Python 2, Python 3 or both. |
34 |
| - 'Programming Language :: Python :: 2', |
35 |
| - 'Programming Language :: Python :: 2.7', |
36 |
| - 'Programming Language :: Python :: 3', |
37 |
| - 'Programming Language :: Python :: 3.3', |
38 |
| - 'Programming Language :: Python :: 3.4', |
39 |
| - 'Programming Language :: Python :: 3.5', |
40 |
| - 'Programming Language :: Python :: 3.6', |
41 |
| - "Programming Language :: Python :: 3.7", |
42 |
| - "Programming Language :: Python :: Implementation :: CPython", |
43 |
| - "Programming Language :: Python :: Implementation :: PyPy", |
44 |
| - ], |
45 |
| - keywords='kaitai,struct,construct,ksy,declarative,data structure,data format,file format,packet format,binary,parser,parsing,unpack,development', |
46 |
| - py_modules=["kaitaistruct"], |
47 |
| -) |
| 11 | +setup(**cfg) |
0 commit comments