forked from PyFstat/PyFstat
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsetup.py
More file actions
116 lines (109 loc) · 3.45 KB
/
setup.py
File metadata and controls
116 lines (109 loc) · 3.45 KB
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
import os
import sys
from setuptools import find_packages, setup
import versioneer
# check python version
min_python_version = (3, 9, 0) # (major,minor,micro)
next_unsupported_python_version = (3, 13) # (major,minor) - don't restrict micro
python_version = sys.version_info
if (
python_version < min_python_version
or python_version > next_unsupported_python_version
):
sys.exit(
f"Python {'.'.join(str(v) for v in python_version[:3])} is not supported, aborting setup."
)
else:
print(
f"Confirmed Python version between [{'.'.join(str(v) for v in min_python_version[:3])},"
f" {'.'.join(str(v) for v in next_unsupported_python_version[:2])}]"
)
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>=3.3",
"numpy<2.0",
"pathos",
"ptemcee",
"scipy",
"setuptools; python_version >= '3.12'",
"tqdm",
"versioneer",
]
lalsuite = "lalsuite[lalpulsar]>=7.13"
extras_require = {
"chainconsumer": ["chainconsumer"],
"dev": [
"pre-commit",
],
"docs": [
"sphinx==7.4.7",
"sphinx_autodoc_defaultargs==0.1.2",
"sphinx_autodoc_typehints==2.3.0",
"sphinx_gallery==0.17.1",
"sphinx_rtd_theme==2.0.0",
"m2r2==0.3.3.post2",
"mistune==0.8.4",
"pillow==10.4.0",
],
"pycuda": ["pycuda"],
"style": [
"black",
"codespell",
"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,
)