-
Notifications
You must be signed in to change notification settings - Fork 27
/
setup.py
109 lines (102 loc) · 3.19 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
import os
import sys
from setuptools import find_packages, setup
import versioneer
# check python version
min_python_version = (3, 8, 0) # (major,minor,micro)
python_version = sys.version_info
print("Running Python version %s.%s.%s" % python_version[:3])
if python_version < min_python_version:
sys.exit(
"Python < %s.%s.%s is not supported, aborting setup" % min_python_version[:3]
)
else:
print("Confirmed Python version %s.%s.%s or above" % min_python_version[:3])
here = os.path.abspath(os.path.dirname(__file__))
# Get the long description from the README file
with open(os.path.join(here, "README.md"), encoding="utf-8") as f:
long_description = f.read()
# dependencies
requires = [
"attrs",
"corner",
"dill",
"matplotlib>=2.1",
"numpy<1.24.0",
"pathos",
"ptemcee",
"scipy",
"tqdm",
"versioneer",
]
lalsuite = "lalsuite>=7.13"
extras_require = {
"chainconsumer": ["chainconsumer"],
"dev": [
"pre-commit",
],
"docs": [
"sphinx==5.3.0",
"sphinx_autodoc_defaultargs==0.1.2",
"sphinx_autodoc_typehints==1.19.5",
"sphinx_gallery==0.11.1",
"sphinx_rtd_theme==0.5.1",
"m2r2==0.3.3",
"mistune==0.8.4",
"Pillow==9.3.0",
],
"hdf5": ["h5py"],
"pycuda": ["pycuda"],
"style": [
"black",
"flake8",
"flake8-docstrings",
"flake8-executable",
"flake8-isort",
"isort",
],
"test": ["pytest", "pytest-cov", "flaky", "nbmake"],
"wheel": ["wheel", "check-wheel-contents"],
}
for key in ["docs", "style", "test", "wheel"]:
extras_require["dev"] += extras_require[key]
setup(
name="PyFstat",
version=versioneer.get_version(),
cmdclass=versioneer.get_cmdclass(),
author="Gregory Ashton, David Keitel, Reinhard Prix, Rodrigo Tenorio",
author_email="gregory.ashton@ligo.org",
maintainer="David Keitel",
maintainer_email="david.keitel@ligo.org",
license="MIT",
description="a python package for gravitational wave analysis with the F-statistic",
long_description=long_description,
long_description_content_type="text/markdown",
url="https://github.com/PyFstat/PyFstat",
project_urls={
"Changelog": "https://github.com/PyFstat/PyFstat/blob/master/CHANGELOG.md",
"Documentation": "https://pyfstat.readthedocs.io/",
"Issue tracker": "https://github.com/PyFstat/PyFstat/issues",
},
packages=find_packages(),
package_data={
"pyfstat": [
"pyCUDAkernels/cudaTransientFstatExpWindow.cu",
"pyCUDAkernels/cudaTransientFstatRectWindow.cu",
]
},
platforms="POSIX",
classifiers=[
"Programming Language :: Python :: 3",
"License :: OSI Approved :: MIT License",
"Operating System :: POSIX",
"Natural Language :: English",
"Intended Audience :: Science/Research",
"Topic :: Scientific/Engineering :: Astronomy",
"Topic :: Scientific/Engineering :: Physics",
],
python_requires=">=%s.%s.%s" % min_python_version[:3],
install_requires=requires
+ ([] if os.environ.get("NO_LALSUITE_FROM_PYPI", False) else [lalsuite]),
extras_require=extras_require,
)