-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsetup_preprocessing.py
63 lines (51 loc) · 1.54 KB
/
setup_preprocessing.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
from setuptools.command.test import test as TestCommand
import sys
try: # for pip >= 10
from pip._internal.req import parse_requirements
except ImportError: # for pip <= 9.0.3
from pip.req import parse_requirements
try:
from setuptools import setup
except ImportError:
from distutils.core import setup
with open('README.md') as readme_file:
readme = readme_file.read()
install_reqs = parse_requirements('requirements_preprocessing.txt', session=False)
# parse_requirements is not really intended to be used like this. we should probably
# find a better way to start our apps correctly and do not demand on installing
# ourselves...
reqs = [str(ir.req) for ir in install_reqs]
# reqs.remove("None")
test_requirements = [
"pytest",
"mock"
]
class PyTest(TestCommand):
def finalize_options(self):
TestCommand.finalize_options(self)
self.test_args = []
self.test_suite = True
def run_tests(self):
import pytest
errcode = pytest.main(self.test_args)
sys.exit(errcode)
setup(
name='ml_heat',
version='v1.0',
description="heat_detection_sandbox ",
long_description=readme,
author="Sebastian Grill",
author_email='[email protected]',
url='https://anthill.smaxtec.com',
packages=[
'ml_heat'
],
package_dir={'ml_heat': 'ml_heat'},
include_package_data=True,
install_requires=reqs,
zip_safe=False,
keywords='ml_heat',
test_suite='tests',
tests_require=test_requirements,
cmdclass={'test': PyTest},
)