forked from stan-dev/cmdstanpy
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsetup.py
86 lines (68 loc) · 2.18 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
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
#!/usr/bin/env python
import os
import re
from typing import List
import setuptools
HERE = os.path.dirname(__file__)
def readme_contents() -> str:
with open(os.path.join(HERE, 'README.md'), 'r') as fd:
src = fd.read()
return src
def requirements() -> List[str]:
with open(os.path.join(HERE, 'requirements.txt'), 'r') as fd:
src = fd.read()
return src.splitlines()
def requirements_test() -> List[str]:
with open(os.path.join(HERE, 'requirements-test.txt'), 'r') as fd:
src = fd.read()
return src.splitlines()
def requirements_optional() -> List[str]:
with open(os.path.join(HERE, 'requirements-optional.txt'), 'r') as fd:
src = fd.read()
return src.splitlines()
def get_version() -> str:
version_file = open(os.path.join('cmdstanpy', '_version.py'))
version_contents = version_file.read()
return re.search("__version__ = '(.*?)'", version_contents).group(1)
_classifiers = """
Programming Language :: Python :: 3
License :: OSI Approved :: BSD License
Operating System :: OS Independent
Development Status :: 5 - Production/Stable
Intended Audience :: Science/Research
Natural Language :: English
Programming Language :: Python
Topic :: Scientific/Engineering :: Information Analysis
"""
INSTALL_REQUIRES = requirements()
EXTRAS_REQUIRE = {
'all': requirements_optional(),
'tests': requirements_test(),
'docs': [
'sphinx',
'sphinx-gallery',
'sphinx_rtd_theme',
'numpydoc',
'matplotlib',
],
}
setuptools.setup(
name='cmdstanpy',
version=get_version(),
description='Python interface to CmdStan',
long_description=readme_contents(),
long_description_content_type="text/markdown",
author='Stan Dev Team',
url='https://github.com/stan-dev/cmdstanpy',
packages=['cmdstanpy', 'cmdstanpy.stanfit'],
entry_points={
'console_scripts': [
'install_cmdstan=cmdstanpy.install_cmdstan:__main__',
'install_cxx_toolchain=cmdstanpy.install_cxx_toolchain:__main__',
]
},
install_requires=INSTALL_REQUIRES,
python_requires='>=3.7',
extras_require=EXTRAS_REQUIRE,
classifiers=_classifiers.strip().split('\n'),
)