-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathsetup.py
More file actions
38 lines (29 loc) · 1.12 KB
/
setup.py
File metadata and controls
38 lines (29 loc) · 1.12 KB
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
from setuptools import setup
import sys
__version__ = 'unknown' # This is ovewritten by the execfile below
exec (open('mainline/_version.py').read())
def parse_requirements(filename):
ret = [line.strip() for line in open(filename).read().splitlines()]
ret = [x for x in ret if x and not x[0] in ['#', '-']]
return ret
conf = dict(
name='mainline',
description='Simple yet powerful python dependency injection for py2/py3k',
url='http://github.com/vertical-knowledge/mainline',
author='Vertical Knowledge',
author_email='ops@vertical-knowledge.com',
license='GPL',
keywords=['dependency', 'injection', 'ioc'],
classifiers=[],
version=__version__,
packages=['mainline'],
install_requires=parse_requirements('requirements/install.txt'),
tests_require=parse_requirements('requirements/test.txt'),
# This gets populated below if necessary
setup_requires=[],
)
conf['download_url'] = '{url}/tarball/{version}'.format(**conf)
needs_pytest = {'pytest', 'test', 'ptr'}.intersection(sys.argv)
if needs_pytest:
conf['setup_requires'].append('pytest-runner')
setup(**conf)