-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.py
48 lines (35 loc) · 1.12 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
"""Installation script for the 'dpres-research-rest-api' package"""
import sys
from setuptools import setup, find_packages
from setuptools.command.test import test as TestCommand
class PyTest(TestCommand):
"""Test to storage package"""
test_args = None
test_suite = True
def finalize_options(self):
"""Add options for pytest test runner"""
TestCommand.finalize_options(self)
self.test_args = ['--verbose']
self.test_suite = True
def run_tests(self):
""" Do the tests"""
# import here, cause outside the eggs aren't loaded
import pytest
errno = pytest.main(self.test_args)
sys.exit(errno)
def main():
"""Install dpres-research-rest-api Python libraries"""
setup(
name='dpres-research-rest-api',
packages=find_packages(exclude=['tests', 'tests.*']),
setup_requires=['setuptools_scm'],
use_scm_version=True,
install_requires=[
"flask",
"flask-cors",
],
tests_require=['pytest'],
cmdclass={'test': PyTest}
)
if __name__ == '__main__':
main()