-
Notifications
You must be signed in to change notification settings - Fork 9
/
setup.py
110 lines (95 loc) · 3.29 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
#!/usr/bin/env python
# coding: utf-8
# Copyright (c) Jupyter Development Team.
# Distributed under the terms of the Modified BSD License.
# the name of the project
name = 'ipydatawidgets'
#-----------------------------------------------------------------------------
# get on with it
#-----------------------------------------------------------------------------
import io
import os
from setuptools import setup, find_packages
from jupyter_packaging import (create_cmdclass, install_npm, ensure_targets,
combine_commands)
pjoin = os.path.join
here = os.path.abspath(os.path.dirname(__file__))
# Representative files that should exist after a successful build
jstargets = [
os.path.join(here, name, 'nbextension', 'static', 'extension.js'),
os.path.join(here, name, 'nbextension', 'static', 'index.js'),
os.path.join(here, 'packages', 'jlabextension', 'build', 'index.js'),
]
version_ns = {}
with io.open(pjoin(here, name, '_version.py'), encoding="utf8") as f:
exec(f.read(), {}, version_ns)
cmdclass = create_cmdclass(
'js',
data_files_spec=[
('share/jupyter/nbextensions/jupyter-datawidgets',
name + '/nbextension/static',
'*.js'),
('share/jupyter/nbextensions/jupyter-datawidgets',
name + '/nbextension/static',
'*.js.map'),
('share/jupyter/lab/extensions',
'packages/jlabextension/dist',
'jupyterlab-datawidgets-*.tgz'),
('share/jupyter/labextensions/jupyterlab-datawidgets',
'packages/jlabextension/dist/jupyterlab-datawidgets',
'**/*.*'),
('etc/jupyter/nbconfig',
'jupyter-config',
'**/*.json'),
],)
cmdclass['js'] = combine_commands(
install_npm(here, npm="yarn"),
ensure_targets(jstargets),
)
setup_args = dict(
name = name,
description = "A set of widgets to help facilitate reuse of large datasets across widgets",
version = version_ns['__version__'],
cmdclass = cmdclass,
packages = find_packages(here),
include_package_data = True,
author = 'Jupyter Development Team',
author_email = '[email protected]',
url = 'https://github.com/vidartf/ipydatawidgets',
license = 'BSD',
platforms = "Linux, Mac OS X, Windows",
python_requires = ">=3.7",
keywords = ['Jupyter', 'Widgets', 'IPython'],
install_requires= [
'ipywidgets>=7.0.0',
'numpy',
'traittypes>=0.2.0',
],
extras_require = {
'test': [
'pytest>=4',
'pytest-cov',
'nbval>=0.9.2',
],
'docs': [
'sphinx',
'recommonmark',
'sphinx_rtd_theme'
],
},
classifiers = [
'Intended Audience :: Developers',
'Intended Audience :: Science/Research',
'License :: OSI Approved :: BSD License',
'Programming Language :: Python',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.5',
'Programming Language :: Python :: 3.6',
'Programming Language :: Python :: 3.7',
'Programming Language :: Python :: 3.8',
'Programming Language :: Python :: 3.9',
'Framework :: Jupyter',
],
)
if __name__ == '__main__':
setup(**setup_args)