forked from data-8/datascience
-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.py
62 lines (50 loc) · 1.88 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
import sys
from setuptools import setup
from setuptools.command.test import test as TestCommand
if sys.version_info < (3, 6):
raise ValueError('This package requires python >= 3.6')
with open('requirements.txt') as fid:
install_requires = [l.strip() for l in fid.readlines() if l]
tests_requires = [
'pytest',
'coverage',
'coveralls',
'bokeh'
]
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 = ['--nbval-lax', '--cov=datascience', 'tests']
def finalize_options(self):
TestCommand.finalize_options(self)
def pytest_collectstart(collector):
collector.skip_compare += 'text/html'
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'],
python_requires='>=3.6',
version = version,
install_requires = install_requires,
tests_require = tests_requires,
cmdclass = {'test': PyTest},
description = 'A Jupyter notebook Python library for introductory data science',
long_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/data-8/datascience',
download_url = 'https://github.com/data-8/datascience/archive/%s.zip' % version,
keywords = ['data', 'tools', 'berkeley'],
classifiers = [],
package_data={"datascience": ["geodata/*.csv"]}
)