-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathsetup.py
executable file
·80 lines (69 loc) · 2.95 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
"""
McUtils
A simple package for working with common McCoy group problems
"""
# pulled from Ryan's stuff, lightly modified
import glob
from setuptools import setup, find_packages
short_description = __doc__.split("\n")
try:
with open("README.md", "r") as handle:
long_description = handle.read()
except:
long_description = "\n".join(short_description[2:])
def get_version():
import subprocess
run_out = subprocess.run(['git', 'describe', '--tags', '--abbrev=0'], capture_output=True)
return run_out.stdout.decode().strip().strip("v")
setup(
# Self-descriptive entries which should always be present
name='mccoygroup-mcutils',
author='Mark Boyer',
author_email='[email protected]',
description=short_description[0],
long_description=long_description,
long_description_content_type="text/markdown",
version=get_version(),
license='MIT',
# Which Python importable modules should be included when your package is installed
# Handled automatically by setuptools. Use 'exclude' to prevent some specific
# subpackage(s) from being added, if needed
packages=find_packages(),
# Optional include package data to ship with your package
# Customize MANIFEST.in if the general case does not suit your needs
# Comment out this line to prevent the files from being packaged with your software
# include_package_data=True
install_requires=[
"numpy>=1.8", # shouldn't need to restrict the python version anymore
"scipy>=1.7.0",
"h5py>=2.10.0",
"numba>=0.57.1",
"matplotlib>=3.3.4",
# "jupyterlab>=3.3.2",
# "ipywidgets>=7.6.3",
# "nglview>=3.0.1",
# "sympy>=1.9"
],
include_package_data=True,
# data_files=[
# # like `jupyter nbextension install --sys-prefix`
# ("share/jupyter/labextensions/ActiveHTMLWidget", [
# "my_fancy_module/static/index.js",
# ]),
# # like `jupyter nbextension enable --sys-prefix`
# ("etc/jupyter/nbconfig/notebook.d", [
# "jupyter-config/nbconfig/notebook.d/my_fancy_module.json"
# ]),
# # like `jupyter serverextension enable --sys-prefix`
# ("etc/jupyter/jupyter_notebook_config.d", [
# "jupyter-config/jupyter_notebook_config.d/my_fancy_module.json"
# ])
# ],
data_files=[
('share/jupyter/nbextensions/ActiveHTMLWidget', glob.glob('McUtils/Jupyter/JHTML/ActiveHTMLWidget/nbextension/*')),
('share/jupyter/labextensions/ActiveHTMLWidget/static', glob.glob('McUtils/Jupyter/JHTML/ActiveHTMLWidget/labextension/static/*.js')),
('share/jupyter/labextensions/ActiveHTMLWidget', glob.glob('McUtils/Jupyter/JHTML/ActiveHTMLWidget/labextension/*.json')),
('share/jupyter/labextensions/ActiveHTMLWidget', ['McUtils/Jupyter/JHTML/ActiveHTMLWidget/install.json']),
('etc/jupyter/nbconfig/notebook.d', ['McUtils/Jupyter/JHTML/ActiveHTMLWidget/ActiveHTMLWidget.json']),
]
)