-
Notifications
You must be signed in to change notification settings - Fork 3
/
setup.py
74 lines (60 loc) · 2.08 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
66
67
68
69
70
71
72
73
74
#!/usr/bin/env python
"""Setup Pep562."""
from setuptools import setup, find_packages
import os
import imp
import traceback
def get_version():
"""Get version and version_info without importing the entire module."""
path = os.path.join(os.path.dirname(__file__), 'pep562')
fp, pathname, desc = imp.find_module('__init__', [path])
try:
module = imp.load_module('__init__', fp, pathname, desc)
return module.__version__, module.__version_info__._get_dev_status()
except Exception:
print(traceback.format_exc())
finally:
fp.close()
def get_requirements(req):
"""Load list of dependencies."""
install_requires = []
with open(req) as f:
for line in f:
if not line.startswith("#"):
install_requires.append(line.strip())
return install_requires
def get_description():
"""Get long description."""
with open("README.md", 'r') as f:
desc = f.read()
return desc
VER, DEVSTATUS = get_version()
setup(
name='pep562',
version=VER,
keywords='pep 562 backport',
description='Backport of PEP 562.',
long_description=get_description(),
long_description_content_type='text/markdown',
author='Isaac Muse',
author_email='Isaac.Muse@gmail.com',
url='https://github.com/facelessuser/pep562',
packages=find_packages(exclude=['tests', 'tools']),
license='MIT License',
classifiers=[
'Development Status :: %s' % DEVSTATUS,
'Intended Audience :: Developers',
'License :: OSI Approved :: MIT License',
'Operating System :: OS Independent',
'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 :: 3.8',
'Programming Language :: Python :: 3.9'
]
)