-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.py
72 lines (66 loc) · 2.49 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
import setuptools
import pathlib
import site
import sys
import sysconfig
# odd bug with develop (editable) installs, see: https://github.com/pypa/pip/issues/7953
site.ENABLE_USER_SITE = "--user" in sys.argv[1:]
required = [
"setuptools-git", # see link at bottom: allows to specify package data to keep/upload/etc.
"numpy",
"matplotlib>=3.4.0",
"scipy>=1.7", # requires scipy.stats.qmc for magsim
"numba",
"psutil",
"matplotlib-scalebar>=0.7.2",
"tqdm",
"simplejson",
"pandas", # could be replaced with lighter csv reader
"rebin",
"pyfftw",
"PySimpleGUI", # magsim
"foronoi", # magsim
"python-polylabel", # magism
"dill", # for magsim
"astropy", # remove if remove sigma_clip background sub
"PyQt6" # Needed for gui widget stuff
]
here = pathlib.Path(__file__).parent.resolve()
long_description = (here / "README.md").read_text(encoding="utf-8")
arch = sysconfig.get_platform().replace("-", "_").replace(".", "_")
if __name__ == "__main__":
setuptools.setup(
name="qdmpy",
version="5.7.1",
author="Sam Scholten",
author_email="[email protected]",
description="Quantum Diamond MicroscoPy",
long_description=long_description,
long_description_content_type="text/markdown",
url="https://github.com/casparvitch/qdmpy",
keywords=[
"NV",
"QDM",
"Diamond",
"Quantum",
"Quantum Sensing",
"gpufit",
],
license="MIT",
package_dir={"": "src"},
packages=setuptools.find_packages(
where="src", exclude=["*.tests", "*.tests.*", "tests.*", "tests"]
),
install_requires=required,
python_requires=">=3.8", # check pyfftw
package_data={"": ["*.md", "*.json"]},
setup_requires=["wheel"],
extras_require={
"cpufit": [f"pycpufit @ file://localhost/{here}/gpufit_wheels/pyCpufit-101.2.0-py2.py3-none-{arch}.whl"],
"gpufit": [f"pygpufit @ file://localhost/{here}/gpufit_wheels/pyGpufit-101.2.0-py2.py3-none-{arch}.whl"],
}
)
# https://setuptools.readthedocs.io/en/latest/userguide/datafiles.html
# https://stackoverflow.com/questions/35668295/how-to-include-and-install-local-dependencies-in-setup-py-in-python
# https://setuptools.pypa.io/en/latest/userguide/dependency_management.html#direct-url-dependencies
# https://setuptools.pypa.io/en/latest/userguide/dependency_management.html#optional-dependencies