forked from uber/orbit
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsetup.py
70 lines (56 loc) · 2.01 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
67
68
69
70
from __future__ import print_function
import sys
from setuptools import dist, setup, find_packages
from setuptools.command.build_py import build_py
from setuptools.command.develop import develop
from setuptools.command.test import test as test_command
# # force cython to use setuptools dist
# # see also:
# # https://bugs.python.org/issue23114
# # https://bugs.python.org/issue23102
# dist.Distribution().fetch_build_eggs(['cython'])
DESCRIPTION = "Orbit is a package for Bayesian time series modeling and inference."
def read_long_description(filename="README.md"):
# with open(filename) as f:
with open("README.md", "r", encoding="utf-8") as f:
return f.read().strip()
def requirements(filename="requirements.txt"):
with open(filename) as f:
return f.readlines()
class PyTest(test_command):
def finalize_options(self):
test_command.finalize_options(self)
self.test_args = ["-v"] # test args
self.test_suite = True
def run_tests(self):
import pytest
errcode = pytest.main(self.test_args)
sys.exit(errcode)
setup(
author="Edwin Ng, Zhishi Wang, Steve Yang, Yifeng Wu, Jing Pan",
author_email="[email protected]",
description=DESCRIPTION,
include_package_data=True,
install_requires=requirements("requirements.txt"),
tests_require=requirements("requirements-test.txt"),
cmdclass={
"build_py": build_py,
"develop": develop,
"test": PyTest,
},
test_suite="orbit.tests",
license="Apache License 2.0",
long_description=read_long_description(),
long_description_content_type="text/markdown",
name="orbit-ml",
packages=find_packages(),
url="https://orbit-ml.readthedocs.io/en/stable/",
# version=VERSION, # being maintained by source module
zip_safe=False,
classifiers=[
"Development Status :: 3 - Alpha",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
],
)