forked from scidash/sciunit
-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.py
51 lines (44 loc) · 1.38 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
"""Setup file for SciUnit"""
import sys
import os
try:
from pip.req import parse_requirements
from pip.download import PipSession
except:
from pip._internal.req import parse_requirements
from pip._internal.download import PipSession
from setuptools import setup, find_packages
# IPython 6.0+ does not support Python 2.6, 2.7, 3.0, 3.1, or 3.2
if sys.version_info < (3, 3):
ipython = "ipython>=5.1,<6.0"
else:
ipython = "ipython>=5.1"
def read_requirements():
'''parses requirements from requirements.txt'''
reqs_path = os.path.join('.', 'requirements.txt')
install_reqs = parse_requirements(reqs_path, session=PipSession())
reqs = [str(ir.req) for ir in install_reqs]
return reqs
def get_version():
version = {}
with open("sciunit/version.py") as f:
exec(f.read(), version)
return version['__version__']
setup(
name='sciunit',
version=get_version(),
author='Rick Gerkin',
author_email='[email protected]',
packages=find_packages(),
url='http://sciunit.scidash.org',
license='MIT',
description='A test-driven framework for formally validating scientific models against data.',
long_description="",
test_suite="sciunit.unit_test.core_tests",
install_requires=read_requirements(),
entry_points={
'console_scripts': [
'sciunit = sciunit.__main__:main'
]
}
)