-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathsetup.py
More file actions
86 lines (77 loc) · 2.33 KB
/
setup.py
File metadata and controls
86 lines (77 loc) · 2.33 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
from glob import glob
from os.path import join as pjoin, abspath, dirname
from setuptools import setup, find_packages # type: ignore
from jupyter_packaging import ( # type: ignore
create_cmdclass,
install_npm,
ensure_targets,
combine_commands,
ensure_python,
get_version,
)
ensure_python(">=3.7")
HERE = abspath(dirname(__file__))
name = "algorithmx"
version = get_version(pjoin(name, "_version.py"))
package_data_spec = {
name: [
"nbextension/*",
"labextension/*",
"server/*.html",
"server/dist/*",
]
}
data_files_spec = [
(
"share/jupyter/nbextensions/algorithmx-jupyter",
pjoin(HERE, name, "nbextension"),
"*.js*",
),
("share/jupyter/lab/extensions", pjoin(HERE, name, "labextension"), "*.tgz"),
("etc/jupyter/nbconfig/notebook.d", HERE, "algorithmx-jupyter.json"),
]
cmdclass = create_cmdclass(
None, package_data_spec=package_data_spec, data_files_spec=data_files_spec
)
cmdclass["jsdeps"] = combine_commands(
install_npm(HERE, build_cmd="build", npm=["jlpm"]),
ensure_targets(pjoin(HERE, name, "nbextension", "index.js")),
)
with open(pjoin(HERE, "README.md"), "r") as f:
long_description = f.read()
setup_args = dict(
name=name,
description="A library for network visualization and algorithm simulation.",
version=version,
cmdclass=cmdclass,
packages=find_packages(),
author="Alex Socha",
author_email="algorithmx.lib@gmail.com",
long_description=long_description,
long_description_content_type="text/markdown",
url="https://github.com/algrx/algorithmx-python",
license="MIT",
platforms=["Linux", "MacOS", "Windows"],
keywords=["Jupyter", "JupyterLab", "IPython"],
classifiers=[
"Intended Audience :: Developers",
"Intended Audience :: Science/Research",
"License :: OSI Approved :: MIT License",
"Programming Language :: Python",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.7",
"Framework :: Jupyter",
],
include_package_data=True,
install_requires=[],
extras_require={
"jupyter": [
"ipywidgets>=7.0.0",
"jupyterlab>=2.0.0",
],
"networkx": ["networkx>=2.5"],
},
entry_points={},
)
if __name__ == "__main__":
setup(**setup_args)