-
Notifications
You must be signed in to change notification settings - Fork 16
/
setup.py
executable file
·65 lines (57 loc) · 1.95 KB
/
setup.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
#!/usr/bin/env python
import ast
import email.utils
import os
import re
from setuptools import setup
def read(filename):
with open(os.path.join(os.path.dirname(__file__), filename)) as f:
return f.read()
metadata = dict(
(k, ast.literal_eval(v)) for k, v in
re.findall('^(__version__|__author__|__url__|__licence__) = (.*)$',
read('findimports.py'), flags=re.MULTILINE)
)
version = metadata['__version__']
author, author_email = email.utils.parseaddr(metadata['__author__'])
url = metadata['__url__']
licence = metadata['__licence__']
setup(
name='findimports',
version=version,
author=author,
author_email=author_email,
url=url,
description='Python module import analysis tool',
long_description=read('README.rst') + '\n\n' + read('CHANGES.rst'),
long_description_content_type='text/x-rst',
license=licence,
classifiers=[
'Development Status :: 4 - Beta',
'Intended Audience :: Developers',
'Operating System :: OS Independent',
'Programming Language :: Python',
'Programming Language :: Python :: 3.7',
'Programming Language :: Python :: 3.8',
'Programming Language :: Python :: 3.9',
'Programming Language :: Python :: 3.10',
'Programming Language :: Python :: 3.11',
'Programming Language :: Python :: 3.12',
'Programming Language :: Python :: 3.13',
'Programming Language :: Python :: Implementation :: CPython',
'Programming Language :: Python :: Implementation :: PyPy',
] + [
'License :: OSI Approved :: GNU General Public License (GPL)'
if licence.startswith('GPL') else
'License :: OSI Approved :: MIT License'
if licence.startswith('MIT') else
'License :: uhh, dunno',
],
python_requires='>=3.7',
py_modules=['findimports'],
zip_safe=False,
entry_points="""
[console_scripts]
findimports = findimports:main
""",
)