-
Notifications
You must be signed in to change notification settings - Fork 28
/
setup.py
executable file
·176 lines (150 loc) · 4.67 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
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""Specifies installation requirements and build steps."""
import io
import os
from setuptools import find_packages, setup
from setuptools.command.install import install
NAME = "arpes"
DESCRIPTION = "Modular data analysis code for angle resolved photoemission spectroscopy (ARPES)"
URL = "https://gitlab.com/lanzara-group/python-arpes"
EMAIL = "[email protected]"
AUTHOR = "Conrad Stansbury"
REQUIRES_PYTHON = ">=3.8.0,<3.9" # we're being less permissive because of pyqtgraph
about = {}
with open("./arpes/__init__.py") as fp:
exec(fp.read(), about)
VERSION = about["VERSION"]
DEPENDENCY_GROUPS = {
"core": [
"astropy",
"xarray>=0.16.1",
"h5py>=3.2.1",
"pyqtgraph>=0.12.0,<0.13.0",
"PyQt5==5.15",
"netCDF4>=1.5.0,<2.0.0",
"colorcet",
"pint",
"pandas",
"numpy>=1.20.0,<2.0.0",
"scipy>=1.6.0,<2.0.0",
"lmfit>=1.0.0,<2.0.0",
"scikit-learn",
# plotting
"matplotlib>=3.0.3",
"bokeh>=2.0.0,<3.0.0",
"ipywidgets>=7.0.1,<8.0.0",
# Misc deps
"packaging",
"colorama",
"imageio",
"titlecase",
"tqdm",
"rx",
"dill",
"ase>=3.17.0,<3.22.0",
"numba>=0.53.0,<1.0.0",
],
"igor": ["igor==0.3.1"],
"ml": [
"scikit-learn>=0.24.0,<1.0.0",
"scikit-image",
"cvxpy",
"libgcc",
],
}
requirements = [y for k, v in DEPENDENCY_GROUPS.items() for y in v if k not in {"igor", "ml"}]
DEV_DEPENDENCIES = {
"jupyter": [
"jupyter",
"ipython",
"jupyter_contrib_nbextensions",
"notebook>=5.7.0",
],
"test": [
"attrs==17.4.0",
"pluggy==0.6.0",
"py==1.5.2",
"pytest==3.3.2",
"setuptools==38.4.0",
],
}
with open("./pypi-readme.rst", "r") as f_readme:
long_description = f_readme.read()
DOCUMENTATION_URL = "https://arpes.readthedocs.io/"
POST_INSTALL_MESSAGE = """
Documentation available at: {}
You should follow standard best practices for working with IPython and Jupyter.
To get the interactive volumetric data explorer `qt_tool` you will need to install
`PyQt5` and `pyqtgraph`.
To use the Igor data loading libraries in PyARPES you will need to install the `igor`
module from 'https://github.com/chstan/igorpy/tarball/712a4c4#egg=igor-0.3.1'.
Some functionality, including PCA/Factor Analysis decomposition tools, require
additional heavy dependencies such as `scikit-learn` and `scikit-image`.
For Jupyter integration, please have a look at the documentation (link above).
For support issues, contact [email protected] or [email protected].
""".format(
DOCUMENTATION_URL
)
packages = find_packages(
exclude=(
"tests",
"source",
"info_session",
"scripts",
"docs",
"example_configuration",
"conda",
"figures",
"exp",
"datasets",
"resources",
)
)
here = os.path.abspath(os.path.dirname(__file__))
with io.open(os.path.join(here, "README.rst"), encoding="utf-8") as f:
LONG_DESCRIPTION = "\n" + f.read()
class PostInstallCommand(install):
"""Provides some extra information and context after install."""
def run(self):
"""Print the post-installation message after successful install."""
install.run(self)
print(POST_INSTALL_MESSAGE)
# Where the magic happens:
setup(
name=NAME,
version=VERSION,
description=DESCRIPTION,
long_description=LONG_DESCRIPTION,
author=AUTHOR,
author_email=EMAIL,
python_requires=REQUIRES_PYTHON,
url=URL,
packages=packages,
dependency_links=[
"https://github.com/chstan/igorpy/tarball/712a4c4#egg=igor-0.3.1",
],
install_requires=requirements,
include_package_data=True,
license="GPLv3",
classifiers=[
# Trove classifiers
# Full list: https://pypi.python.org/pypi?%3Aaction=list_classifiers
"License :: OSI Approved :: GNU General Public License v3 (GPLv3)",
"Programming Language :: Python",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: Implementation :: CPython",
"Natural Language :: English",
"Intended Audience :: Science/Research",
"Intended Audience :: Developers",
"Operating System :: OS Independent",
"Topic :: Scientific/Engineering :: Physics",
"Topic :: Scientific/Engineering",
"Topic :: Software Development :: Libraries :: Python Modules",
],
# $ setup.py publish support.
cmdclass={
"install": PostInstallCommand,
},
)