diff --git a/setup.cfg b/setup.cfg index 79bc678..e4b7f1a 100644 --- a/setup.cfg +++ b/setup.cfg @@ -1,5 +1,39 @@ +[metadata] +name = kaitaistruct +version = attr: kaitaistruct.__version__ +author = Kaitai Project +author_email = greycat@kaitai.io +url = http://kaitai.io +description = Kaitai Struct declarative parser generator for binary data: runtime library for Python +long_description = file: README.rst +license = MIT +keywords = kaitai, struct, construct, ksy, declarative, data structure, data format, file format, packet format, binary, parser, parsing, unpack, development +classifiers = + Development Status :: 4 - Beta + Intended Audience :: Developers + Topic :: Software Development :: Build Tools + License :: OSI Approved :: MIT License + Programming Language :: Python :: 2 + Programming Language :: Python :: 2.7 + Programming Language :: Python :: 3 + Programming Language :: Python :: 3.3 + Programming Language :: Python :: 3.4 + Programming Language :: Python :: 3.5 + Programming Language :: Python :: 3.6 + Programming Language :: Python :: 3.7 + Programming Language :: Python :: Implementation :: CPython + Programming Language :: Python :: Implementation :: PyPy + +[options] +zip_safe = True +include_package_data = True +py_modules = kaitaistruct + [bdist_wheel] # This flag says that the code is written to work on both Python 2 and Python # 3. If at all possible, it is good practice to do this. If you cannot, you # will need to generate wheels for each Python version that you support. universal=1 + +[build-system] +requires = ["setuptools", "wheel"] diff --git a/setup.py b/setup.py index e6ea7af..b0686fb 100755 --- a/setup.py +++ b/setup.py @@ -1,47 +1,11 @@ +import os from setuptools import setup -from io import open -from kaitaistruct import __version__ +from setuptools.config import read_configuration -with open('README.rst', encoding='utf-8') as f: - long_description = f.read() +this_dir = os.path.dirname(__file__) +cfg = read_configuration(os.path.join(this_dir, 'setup.cfg')) +#print(cfg) +cfg["options"].update(cfg["metadata"]) +cfg = cfg["options"] -setup( - name='kaitaistruct', - version=__version__, - description='Kaitai Struct declarative parser generator for binary data: runtime library for Python', - long_description=long_description, - url='http://kaitai.io', - author='Kaitai Project', - author_email='greycat@kaitai.io', - license='MIT', - # See https://pypi.python.org/pypi?%3Aaction=list_classifiers - classifiers=[ - # How mature is this project? Common values are - # 3 - Alpha - # 4 - Beta - # 5 - Production/Stable - 'Development Status :: 4 - Beta', - - # Indicate who your project is intended for - 'Intended Audience :: Developers', - 'Topic :: Software Development :: Build Tools', - - # Pick your license as you wish (should match "license" above) - 'License :: OSI Approved :: MIT License', - - # Specify the Python versions you support here. In particular, ensure - # that you indicate whether you support Python 2, Python 3 or both. - 'Programming Language :: Python :: 2', - 'Programming Language :: Python :: 2.7', - 'Programming Language :: Python :: 3', - 'Programming Language :: Python :: 3.3', - 'Programming Language :: Python :: 3.4', - 'Programming Language :: Python :: 3.5', - 'Programming Language :: Python :: 3.6', - "Programming Language :: Python :: 3.7", - "Programming Language :: Python :: Implementation :: CPython", - "Programming Language :: Python :: Implementation :: PyPy", - ], - keywords='kaitai,struct,construct,ksy,declarative,data structure,data format,file format,packet format,binary,parser,parsing,unpack,development', - py_modules=["kaitaistruct"], -) +setup(**cfg)