-
Notifications
You must be signed in to change notification settings - Fork 8
/
setup.py
101 lines (89 loc) · 2.66 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
from __future__ import print_function
import os
from setuptools import setup, find_packages
from distutils import log
from setupbase import (
create_cmdclass, install_npm, combine_commands,
ensure_targets, skip_npm
)
here = os.path.dirname(os.path.abspath(__file__))
node_root = os.path.join(here, 'js')
log.set_verbosity(log.DEBUG)
log.info('setup.py entered')
log.info('$PATH=%s' % os.environ['PATH'])
LONG_DESCRIPTION = 'Jupyter notebook extension for 3D visualization.'
# Representative files that should exist after a successful build
targets = [
os.path.join(here, 'k3d', 'static', 'standalone.js'),
os.path.join(here, 'k3d', 'static', 'extension.js'),
os.path.join(here, 'k3d', 'static', 'index.js')
]
cmdclass = create_cmdclass(
wrappers=[] if skip_npm else ['jsdeps'],
data_dirs=[]
)
cmdclass['jsdeps'] = combine_commands(
install_npm(node_root),
ensure_targets(targets)
)
version_ns = {}
with open(os.path.join(here, 'k3d', '_version.py')) as f:
exec (f.read(), {}, version_ns)
setup_args = {
'name': 'K3D',
'version': version_ns['__version__'],
'license': 'MIT',
'description': 'Jupyter notebook extension for 3D visualization.',
'long_description': LONG_DESCRIPTION,
'include_package_data': True,
'data_files': [
(
'share/jupyter/nbextensions/k3d',
[
'k3d/static/extension.js',
'k3d/static/standalone.js',
'k3d/static/index.js',
'k3d/static/index.js.map',
]
),
(
'etc/jupyter/nbconfig/notebook.d',
[
'k3d/k3d_extension.json',
]
),
],
'install_requires': [
'ipywidgets>=7.0.1',
'ipydatawidgets',
'traittypes',
'traitlets',
'numpy>=1.11.0'
],
'packages': find_packages(),
'zip_safe': False,
'cmdclass': cmdclass,
'author': 'k3d team',
'author_email': 'artur.trzesiok@gmail.com',
'url': 'http://jupyter.org',
'keywords': [
'ipython',
'jupyter',
'widgets',
],
'classifiers': [
'Development Status :: 4 - Beta',
'Framework :: IPython',
'Intended Audience :: Developers',
'Intended Audience :: Science/Research',
'Topic :: Multimedia :: Graphics',
'Programming Language :: Python :: 2',
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.4',
'Programming Language :: Python :: 3.5',
'Programming Language :: Python :: 3.6',
],
}
if __name__ == '__main__':
setup(**setup_args)