-
Notifications
You must be signed in to change notification settings - Fork 9
/
Copy pathsetup.py
66 lines (54 loc) · 1.67 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
64
65
66
import pip
import sys
import os
from setuptools import setup
from setuptools.command.test import test as TestCommand
from setuptools.command.install import install
reqs = open('./requirements.txt', 'r').read().split('\n')
class OverrideInstall(install):
"""
Emulate sequential install of pip install -r requirements.txt
To fix numpy bug in scipy, scikit in py2
"""
def run(self):
for req in reqs:
if req:
pip.main(["install", "-U", req])
# explicitly config
test_args = [
'--cov-report=term',
'--cov-report=html',
'--cov=rl',
'test'
]
class PyTest(TestCommand):
user_options = [('pytest-args=', 'a', "Arguments to pass to pytest")]
def initialize_options(self):
TestCommand.initialize_options(self)
self.pytest_args = []
def run_tests(self):
import shlex
#import here, cause outside the eggs aren't loaded
import pytest
errno = pytest.main(shlex.split(self.pytest_args))
sys.exit(errno)
# Utility function to read the README file.
def read(fname):
return open(os.path.join(os.path.dirname(__file__), fname)).read()
# the setup
setup(
name='Neural-Networks-Workshop-Materials-WiMLDS',
version='0.0.1',
description='Materials for Neural Networks Workshop',
long_description=read('README.md'),
url='https://github.com/lgraesser/Neural-Networks-Workshop-Materials-WiMLDS.git',
author='laura',
author_email='[email protected]',
license='MIT',
packages=[],
install_requires=[],
dependency_links=[],
tests_require=['pytest'],
test_suite='test',
cmdclass={'test': PyTest, 'install': OverrideInstall}
)