-
Notifications
You must be signed in to change notification settings - Fork 3
/
setup.py
125 lines (109 loc) · 2.97 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
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
"""
Setup Module to setup Python Handlers for ballet-assemble.
"""
import os
from setupbase import (
create_cmdclass, install_npm, ensure_targets,
combine_commands, ensure_python
)
from setuptools import setup, find_packages
HERE = os.path.abspath(os.path.dirname(__file__))
# Ensure a valid python version
ensure_python('>=3.6')
# Representative files that should exist after a successful build
jstargets = [
os.path.join(HERE, 'lib', 'serverextension.js'),
]
package_data_spec = {
'ballet_assemble': [
'*'
]
}
data_files_spec = [
(
'share/jupyter/lab/extensions',
os.path.join(HERE, 'server', 'ballet_assemble', 'labextension'),
'*.tgz',
),
(
'etc/jupyter/jupyter_notebook_config.d',
os.path.join(HERE, 'server', 'jupyter-config'),
'ballet-assemble.json',
),
]
cmdclass = create_cmdclass(
prerelease_cmd='jsdeps',
package_data_spec=package_data_spec,
data_files_spec=data_files_spec
)
cmdclass['jsdeps'] = combine_commands(
install_npm(HERE, build_cmd='build:all', npm=['jlpm']),
ensure_targets(jstargets),
)
with open('README.md', 'r', encoding='utf-8') as f:
long_description = f.read()
install_requires = [
'ballet',
'black == 19.10b0',
'funcy',
'gitpython',
'jupyterlab ~= 2.0',
'importlib-metadata; python_version < "3.8"',
'notebook',
'pygithub',
'requests',
'stacklog',
'tenacity',
'tornado',
]
test_requirements = [
'coverage >= 4.5.1',
'pytest >= 3.4.2',
'pytest-cov >= 2.6',
]
development_requirements = [
# general
'bump2version >= 1.0.0',
'pip >= 9.0.1',
# style check
'flake8 >= 3.5.0',
'isort >= 4.3.4, <= 4.3.9',
# distribute on PyPI
'twine >= 1.10.0',
'wheel >= 0.30.0',
]
setup_args = dict(
name='ballet-assemble',
version='0.8.8',
url='https://github.com/ballet/ballet-assemble',
author='Micah Smith',
description='Submit ballet modules from within JupyterLab',
long_description=long_description,
long_description_content_type='text/markdown',
cmdclass=cmdclass,
packages=find_packages(where='server',
include=['ballet_assemble',
'ballet_assemble.*']),
package_dir={'': 'server'},
install_requires=install_requires,
extras_require={
'test': test_requirements,
'dev': development_requirements + test_requirements,
},
zip_safe=False,
include_package_data=True,
license='MIT',
platforms='Linux, Mac OS X, Windows',
keywords=['Jupyter', 'JupyterLab'],
classifiers=[
'License :: OSI Approved :: BSD License',
'Programming Language :: Python',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.6',
'Programming Language :: Python :: 3.7',
'Programming Language :: Python :: 3.8',
'Framework :: Jupyter',
],
)
if __name__ == '__main__':
setup(**setup_args)