| 1 |
#!/usr/bin/env python |
| 2 |
import ast |
| 3 |
import email.utils |
| 4 |
import os |
| 5 |
import re |
| 6 |
|
| 7 |
from setuptools import setup |
| 8 |
|
| 9 |
|
| 10 |
here = os.path.dirname(__file__) |
| 11 |
|
| 12 |
with open(os.path.join(here, 'README.rst')) as readme: |
| 13 |
with open(os.path.join(here, 'CHANGES.rst')) as changelog: |
| 14 |
long_description = readme.read() + '\n\n' + changelog.read() |
| 15 |
|
| 16 |
metadata = {} |
| 17 |
with open(os.path.join(here, 'check_manifest.py')) as f: |
| 18 |
rx = re.compile('(__version__|__author__|__url__|__licence__) = (.*)') |
| 19 |
for line in f: |
| 20 |
m = rx.match(line) |
| 21 |
if m: |
| 22 |
metadata[m.group(1)] = ast.literal_eval(m.group(2)) |
| 23 |
version = metadata['__version__'] |
| 24 |
author, author_email = email.utils.parseaddr(metadata['__author__']) |
| 25 |
url = metadata['__url__'] |
| 26 |
licence = metadata['__licence__'] |
| 27 |
|
| 28 |
setup( |
| 29 |
name='check-manifest', |
| 30 |
version=version, |
| 31 |
author=author, |
| 32 |
author_email=author_email, |
| 33 |
url=url, |
| 34 |
description='Check MANIFEST.in in a Python source package for completeness', |
| 35 |
long_description=long_description, |
| 36 |
long_description_content_type='text/x-rst', |
| 37 |
keywords=['distutils', 'setuptools', 'packaging', 'manifest', 'checker', |
| 38 |
'linter'], |
| 39 |
classifiers=[ |
| 40 |
'Development Status :: 4 - Beta', |
| 41 |
'Environment :: Console', |
| 42 |
'Intended Audience :: Developers', |
| 43 |
'License :: OSI Approved :: MIT License', |
| 44 |
'Operating System :: OS Independent', |
| 45 |
'Programming Language :: Python', |
| 46 |
'Programming Language :: Python :: 3', |
| 47 |
'Programming Language :: Python :: 3.10', |
| 48 |
'Programming Language :: Python :: 3.11', |
| 49 |
'Programming Language :: Python :: 3.12', |
| 50 |
'Programming Language :: Python :: 3.13', |
| 51 |
'Programming Language :: Python :: 3.14', |
| 52 |
'Programming Language :: Python :: Implementation :: CPython', |
| 53 |
'Programming Language :: Python :: Implementation :: PyPy', |
| 54 |
], |
| 55 |
license=licence, |
| 56 |
|
| 57 |
py_modules=['check_manifest'], |
| 58 |
zip_safe=False, |
| 59 |
python_requires=">=3.10", |
| 60 |
install_requires=[ |
| 61 |
'build>=0.1', |
| 62 |
'setuptools', |
| 63 |
'tomli;python_version < "3.11"', |
| 64 |
], |
| 65 |
extras_require={ |
| 66 |
'test': [ |
| 67 |
'pytest', |
| 68 |
'wheel', |
| 69 |
], |
| 70 |
}, |
| 71 |
entry_points={ |
| 72 |
'console_scripts': [ |
| 73 |
'check-manifest = check_manifest:main', |
| 74 |
], |
| 75 |
'zest.releaser.prereleaser.before': [ |
| 76 |
'check-manifest = check_manifest:zest_releaser_check', |
| 77 |
], |
| 78 |
}, |
| 79 |
) |