forked from data-8/datascience
-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.py
56 lines (44 loc) · 1.61 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
import sys
from setuptools import setup
from setuptools.command.test import test as TestCommand
if sys.version_info < (3, 0):
raise ValueError('This package requires python >= 3.0')
with open('requirements.txt') as fid:
install_requires = [l.strip() for l in fid.readlines() if l]
tests_requires = [
'pytest',
'coverage == 3.7.1',
'coveralls == 0.5'
]
with open('datascience/version.py') as fid:
for line in fid:
if line.startswith('__version__'):
version = line.strip().split()[-1][1:-1]
break
class PyTest(TestCommand):
user_options = [('pytest-args=', 'a', "Arguments to pass to py.test")]
def initialize_options(self):
TestCommand.initialize_options(self)
self.pytest_args = ['tests']
def finalize_options(self):
TestCommand.finalize_options(self)
def run_tests(self):
# import here, cause outside the eggs aren't loaded
import pytest
errno = pytest.main(self.pytest_args)
sys.exit(errno)
setup(
name = 'datascience',
packages = ['datascience'],
version = version,
install_requires = install_requires + tests_requires,
tests_require = tests_requires,
cmdclass = {'test': PyTest},
description = 'A Jupyter notebook Python library for introductory data science',
author = 'John DeNero, David Culler, Alvin Wan, Sam Lau',
author_email = '[email protected]',
url = 'https://github.com/dsten/datascience',
download_url = 'https://github.com/dsten/datascience/archive/%s.zip' % version,
keywords = ['data', 'tools', 'berkeley'],
classifiers = []
)