|
1 | 1 | #!/usr/bin/env python |
2 | | -# -*- coding: utf-8 -*- |
| 2 | + |
| 3 | +import os |
3 | 4 |
|
4 | 5 | from setuptools import Extension, setup |
5 | 6 |
|
6 | | -__version__ = '1.0.0' |
| 7 | +NAME = 'bchlib' |
| 8 | +VERSION = '1.0.0' |
| 9 | +DESCRIPTION = 'A python wrapper module for the Linux kernel BCH library.', |
| 10 | +URL = 'https://github.com/jkent/python-bchlib' |
| 11 | + |
| 12 | +AUTHOR = 'Jeff Kent' |
| 13 | +REQUIRES_PYTHON = '>=3.6.0' |
| 14 | + |
| 15 | +BCHLIB_EXT_SRC = [ |
| 16 | + 'src/bch.c', |
| 17 | + 'src/bchlib.c', |
| 18 | +] |
7 | 19 |
|
8 | | -bchlib_src = ['src/bchlib.c', |
9 | | - 'src/bch.c'] |
10 | | -bchlib_dep = ['src/bch.h'] |
| 20 | +BCHLIB_EXT_DEP = [ |
| 21 | + 'src/bch.h', |
| 22 | +] |
11 | 23 |
|
12 | | -bchlib_ext = Extension('bchlib', bchlib_src, depends=bchlib_dep, |
| 24 | +BCHLIB_EXT = Extension('bchlib', BCHLIB_EXT_SRC, depends=BCHLIB_EXT_DEP, |
13 | 25 | extra_compile_args=['-std=c99']) |
14 | 26 |
|
15 | | -setup(name='bchlib', version = __version__, |
16 | | - ext_modules = [bchlib_ext], |
17 | | - description = 'A python wrapper module for the kernel BCH library.', |
18 | | - url = 'https://github.com/jkent/python-bchlib', |
19 | | - author = 'Jeff Kent', |
20 | | - author_email = '[email protected]', |
21 | | - maintainer = 'Jeff Kent', |
22 | | - maintainer_email = '[email protected]', |
23 | | - license = 'GNU GPLv2', |
24 | | - classifiers = [ |
25 | | - 'Development Status :: 4 - Beta', |
26 | | - 'Intended Audience :: Developers', |
| 27 | +here = os.path.abspath(os.path.dirname(__file__)) |
| 28 | +with open(os.path.join(here, 'README.md'), encoding='utf-8') as f: |
| 29 | + long_description = '\n' + f.read() |
| 30 | + |
| 31 | +setup( |
| 32 | + name=NAME, |
| 33 | + version=VERSION, |
| 34 | + description=DESCRIPTION, |
| 35 | + long_description=long_description, |
| 36 | + long_description_content_type='text/markdown', |
| 37 | + author=AUTHOR, |
| 38 | + author_email=EMAIL, |
| 39 | + python_requires=REQUIRES_PYTHON, |
| 40 | + url=URL, |
| 41 | + ext_modules=[BCHLIB_EXT], |
| 42 | + include_package_data=True, |
| 43 | + license='GNU GPLv2', |
| 44 | + classifiers=[ |
27 | 45 | 'License :: OSI Approved :: GNU General Public License v2 (GPLv2)', |
28 | | - 'Operating System :: POSIX :: Linux', |
29 | | - 'Programming Language :: C', |
| 46 | + 'Programming Language :: Python', |
30 | 47 | 'Programming Language :: Python :: 3', |
| 48 | + 'Programming Language :: Python :: 3.6', |
| 49 | + 'Programming Language :: Python :: Implementation :: CPython', |
| 50 | + 'Programming Language :: Python :: Implementation :: PyPy', |
| 51 | + 'Intended Audience :: Developers', |
31 | 52 | 'Topic :: Security :: Cryptography', |
32 | | - 'Topic :: Software Development :: Libraries :: Python Modules', |
33 | | - ], |
| 53 | + ], |
34 | 54 | ) |
0 commit comments