forked from CermakM/jupyter-require
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsetup.py
103 lines (83 loc) · 2.65 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
# -*- coding: utf-8 -*-
from __future__ import print_function
import os
from pathlib import Path
from setupbase import (
log,
create_cmdclass,
install_npm,
combine_commands,
ensure_targets,
)
from setuptools import setup
from setuptools import find_packages
HERE = Path(__file__).parent
NAME = 'jupyter_require'
ABOUT = dict()
exec(Path(HERE, NAME, '__about__.py').read_text(), ABOUT)
README: str = Path(HERE, "README.rst").read_text(encoding='utf-8')
REQUIREMENTS: list = Path(HERE, 'requirements.txt').read_text().splitlines()
log.set_verbosity(log.DEBUG)
log.info('setup.py entered')
log.info('$PATH=%s' % os.environ['PATH'])
cmdclass = create_cmdclass(
'js',
data_files_spec=[
('share/jupyter/nbextensions/jupyter-require',
NAME + '/static',
'*.js'),
('share/jupyter/nbextensions/jupyter-require',
NAME + '/static',
'*.js.map'),
('etc/jupyter/nbconfig',
'jupyter-config',
'**/*.json'),
],
)
cmdclass['js'] = combine_commands(
# FIXME when migrated to node.js
# install_npm(
# path=Path(HERE, 'js'),
# build_dir=Path(HERE, NAME, 'static'),
# source_dir=Path(HERE, 'js'),
# build_cmd='build:all'
# ),
ensure_targets([
NAME + '/static/core.js', # FIXME when migrated to nodes.js
NAME + '/static/display.js', # FIXME when migrated to nodes.js
NAME + '/static/extension.js',
NAME + '/static/loader.js', # FIXME when migrated to nodes.js
NAME + '/static/logger.js', # FIXME when migrated to nodes.js
# NAME + '/static/index.js', # FIXME when migrated to nodes.js
]),
)
setup(
name=ABOUT['__title__'],
version=ABOUT['__version__'],
author=ABOUT['__author__'],
author_email=ABOUT['__email__'],
url=ABOUT['__uri__'],
license=ABOUT['__license__'],
description=ABOUT['__summary__'],
long_description=README,
long_description_content_type='text/x-rst',
classifiers=[
"Development Status :: 2 - Pre-Alpha",
"Framework :: IPython",
"Framework :: Jupyter",
"License :: OSI Approved :: MIT License",
"Natural Language :: English",
"Operating System :: OS Independent",
"Programming Language :: JavaScript",
"Programming Language :: Python :: 3.5",
"Programming Language :: Python :: 3.6",
"Programming Language :: Python :: 3.7",
"Topic :: Scientific/Engineering :: Visualization",
"Topic :: Utilities"
],
install_requires=REQUIREMENTS,
cmdclass=cmdclass,
packages=find_packages(),
include_package_data=True,
zip_safe=False
)