-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathsetup.py
63 lines (53 loc) · 1.9 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
import os
from setuptools import setup, find_packages
here = os.path.abspath(os.path.dirname(__file__))
make_abs = lambda fn: os.path.join(here, fn)
def parse_requirments(fn, dependency_links):
requirements = []
if not os.path.exists(fn):
return requirements, dependency_links
with open(fn, 'r') as f:
for dep in f:
dep = dep.strip()
# need to make github requirements work with
# setuptools like it would work with `pip -r`
# URLs will not work, so we transform them to
# dependency_links and requirements
if dep.startswith('git+'):
dependency_links.append(dep)
_, dep = dep.rsplit('#egg=', 1)
dep = dep.replace('-', '==', 1)
requirements.append(dep)
return requirements, dependency_links
requirements, dependency_links = parse_requirments(
make_abs('requirements.txt'), [])
test_requirements, dependency_links = parse_requirments(
make_abs('test_requirements.txt'), dependency_links)
setup(
name='gonzo',
packages=find_packages(exclude=['tests', 'tests.*']),
version='0.4.2',
author='onefinestay',
author_email='[email protected]',
url='https://github.com/onefinestay/gonzo',
install_requires=requirements,
tests_require=test_requirements,
classifiers=[
"Development Status :: 3 - Alpha",
"Programming Language :: Python",
"Intended Audience :: Developers",
"Natural Language :: English",
"Topic :: Software Development",
"Topic :: Utilities",
"Environment :: Console",
],
description='Instance and release management made easy',
long_description=open(make_abs('README.rst')).read(),
include_package_data=True,
entry_points={
'console_scripts': [
'gonzo = gonzo.scripts.base:main'
]
},
zip_safe=False,
)