-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathsetup.py
More file actions
121 lines (108 loc) · 3.96 KB
/
setup.py
File metadata and controls
121 lines (108 loc) · 3.96 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
117
118
119
120
121
"""
This setup.py file sets up our package to be installable on any computer,
so that folks can `import chromatic` from within any directory.
Thanks to this file, you can...
...tell python to look for code in the current directory (which you
can continue to edit), by typing *one* of the following commands:
`pip install -e .`
or
`python setup.py develop`
...move a copy of this code to your site-packages directory, where python will
be able to find it (but you won't be able to keep editing it), by typing *one*
of the following commands:
`pip install .`
or
`python setup.py install`
...upload the entire package to the Python Package Index, so that other folks
will be able to install your package via the simple `pip install chromatic-lightcurves`, by
running the following command:
`python setup.py release`
The template for this setup.py came was pieced together with help from
@christinahedges, @barentsen, @timothydmorton, and @dfm. Check them
out on github for more beautiful code!
[`python-packaging`](https://python-packaging.readthedocs.io/en/latest/index.html)
is a pretty useful resource too!
"""
# import our basic setup ingredients
from setuptools import setup, find_packages
import os, sys
# running `python setup.py release` from the command line will post to PyPI
if "release" in sys.argv[-1]:
os.system("python setup.py sdist")
# uncomment the next line to test out on test.pypi.com/project/tess-zap
# os.system("twine upload --repository-url https://test.pypi.org/legacy/ dist/*")
os.system("twine upload dist/*")
os.system("rm -rf dist/chromatic-lightcurves*")
sys.exit()
# a little kludge to get the version number from __version__
exec(open("chromatic/version.py").read())
# run the setup function
setup(
# the name folks can use to search for this with pip
name="chromatic-lightcurves",
# what version of the code is this?
version=__version__,
# what's a short description of the package?
description="Tools for working with spectroscopic light curves (of transiting exoplanets).",
# what's a more detailed description?
long_description="Read the complete documentation at https://zkbt.github.io/chromatic/",
# who's the main author?
author="Zach Berta-Thompson",
# what's the main author's email?
author_email="zach.bertathompson@colorado.edu",
# what's the URL for the repository?
url="https://github.com/zkbt/chromatic",
# this figures out what subdirectories to include
packages=find_packages(),
# are there data that should be accessible when installed?
include_package_data=True,
# are there scripts to be copied into your $PATH?
scripts=[],
# some descriptions about this package (for searchability)
classifiers=[
"Intended Audience :: Education",
"Intended Audience :: Science/Research",
"Programming Language :: Python",
"Topic :: Scientific/Engineering :: Astronomy",
],
# what other packages are needed? (must be pip-installable)
install_requires=[
"numpy",
"scipy",
"matplotlib>=3.5",
"astropy>=5.0",
"pandas",
"tqdm",
"altair",
"xarray",
"h5py",
"h5netcdf",
"exoplanet-core",
"astroquery",
],
# what version of Python is required?
python_requires=">=3.7", # f-strings are introduced in 3.6!
# requirements in `key` will install with `pip install chromatic-lightcurves[key]`
extras_require={
"develop": [
"pytest",
"black",
"jupyter",
"ipython",
"mkdocs",
"mkdocs-material",
"mkdocstrings",
"mkdocstrings-python",
"pytkdocs[numpy-style]",
"mkdocs-jupyter",
"mkdocs-exclude",
"twine",
"pre-commit",
"h5py",
]
},
# (I think just leave this set to False)
zip_safe=False,
# under what license is this code released?
license="MIT",
)