forked from finos/jupyterlab_templates
-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.py
81 lines (65 loc) · 2.16 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
from setuptools import setup, find_packages
from codecs import open
from os import path
from jupyter_packaging import (
create_cmdclass, install_npm, ensure_targets,
combine_commands, ensure_python, get_version
)
pjoin = path.join
ensure_python(('2.7', '>=3.3'))
name = 'jupyterlab_templates'
here = path.abspath(path.dirname(__file__))
version = get_version(pjoin(here, name, '_version.py'))
with open(path.join(here, 'README.md'), encoding='utf-8') as f:
long_description = f.read()
with open(path.join(here, 'requirements.txt'), encoding='utf-8') as f:
requires = f.read().split()
data_spec = [
# Lab extension installed by default:
('share/jupyter/lab/extensions',
'lab-dist',
'jupyterlab_templates-*.tgz'),
# Config to enable server extension by default:
('etc/jupyter',
'jupyter-config',
'**/*.json'),
]
cmdclass = create_cmdclass('js', data_files_spec=data_spec)
cmdclass['js'] = combine_commands(
install_npm(here, build_cmd='build:all'),
ensure_targets([
pjoin(here, 'lib', 'index.js'),
pjoin(here, 'style', 'index.css')
]),
)
setup(
name=name,
version=version,
description='Automatically version notebooks from JupyterLab',
long_description=long_description,
url='https://github.com/timkpaine/jupyterlab_templates',
author='Tim Paine',
author_email='[email protected]',
license='Apache 2.0',
classifiers=[
'Development Status :: 3 - Alpha',
'Programming Language :: Python :: 2',
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.3',
'Programming Language :: Python :: 3.4',
'Programming Language :: Python :: 3.5',
'Programming Language :: Python :: 3.6',
'Programming Language :: Python :: 3.7',
'Framework :: Jupyter',
],
cmdclass=cmdclass,
keywords='jupyter jupyterlab',
packages=find_packages(exclude=['tests', ]),
install_requires=requires,
extras_require={
'dev': ['pytest', 'pytest-cov', 'pylint', 'flake8', 'bumpversion']
},
include_package_data=True,
zip_safe=False,
)