-
Notifications
You must be signed in to change notification settings - Fork 2
/
setup.py
128 lines (112 loc) · 3.82 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
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
import sys
from pathlib import Path
from packaging.version import parse
from setuptools import find_packages, setup
min_version, max_version = ("3.9", "3.11")
min_version = parse(min_version)
max_version = parse(max_version)
if not (
min_version <= parse(".".join([str(v) for v in sys.version_info[:2]])) <= max_version
):
# Python 3.5 does not support f-strings
py_version = ".".join([str(v) for v in sys.version_info[:3]])
error = (
"\n----------------------------------------\n"
f"Error: Pseudopeople runs under python {min_version.base_version}-{max_version.base_version}.\n"
f"You are running python {py_version}"
)
print(error, file=sys.stderr)
sys.exit(1)
if __name__ == "__main__":
base_dir = Path(__file__).parent
src_dir = base_dir / "src"
about = {}
with (src_dir / "pseudopeople" / "__about__.py").open() as f:
exec(f.read(), about)
with (base_dir / "README.rst").open() as f:
long_description = f.read()
install_requirements = [
"pandas",
"numpy<2.0.0",
"pyyaml>=5.1",
"vivarium>=1.2.0",
"pyarrow",
"tqdm",
"layered_config_tree>=1.0.1",
]
setup_requires = ["setuptools_scm"]
interactive_requirements = [
"IPython",
"ipywidgets",
"jupyter",
]
dask_requirements = ["dask[distributed,dataframe]"]
test_requirements = [
"pytest",
"pytest-mock",
] + dask_requirements
lint_requirements = [
"black==22.3.0",
"isort",
]
doc_requirements = [
"sphinx>=4.0",
"sphinx-rtd-theme",
"sphinx-click",
"IPython",
"matplotlib",
]
setup(
name=about["__title__"],
description=about["__summary__"],
long_description=long_description,
license=about["__license__"],
url=about["__uri__"],
author=about["__author__"],
author_email=about["__email__"],
classifiers=[
"Intended Audience :: Developers",
"Intended Audience :: Education",
"Intended Audience :: Science/Research",
"License :: OSI Approved :: BSD License",
"Natural Language :: English",
"Operating System :: MacOS :: MacOS X",
"Operating System :: POSIX",
"Operating System :: POSIX :: BSD",
"Operating System :: POSIX :: Linux",
"Operating System :: Microsoft :: Windows",
"Programming Language :: Python",
"Programming Language :: Python :: Implementation :: CPython",
"Topic :: Education",
"Topic :: Scientific/Engineering",
"Topic :: Scientific/Engineering :: Artificial Life",
"Topic :: Scientific/Engineering :: Mathematics",
"Topic :: Software Development :: Libraries",
],
package_dir={"": "src"},
packages=find_packages(where="src"),
include_package_data=True,
install_requires=install_requirements,
tests_require=test_requirements,
extras_require={
"docs": doc_requirements,
"test": test_requirements,
"interactive": interactive_requirements,
"dev": doc_requirements
+ test_requirements
+ interactive_requirements
+ lint_requirements,
"dask": dask_requirements,
},
# entry_points="""
# [console_scripts]
# simulate=pseudopeople.interface.cli:simulate
# """,
zip_safe=False,
use_scm_version={
"write_to": "src/pseudopeople/_version.py",
"write_to_template": '__version__ = "{version}"\n',
"tag_regex": r"^(?P<prefix>v)?(?P<version>[^\+]+)(?P<suffix>.*)?$",
},
setup_requires=setup_requires,
)