-
Notifications
You must be signed in to change notification settings - Fork 106
/
setup.py
102 lines (87 loc) · 2.91 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
import os
from subprocess import check_call
from setuptools import find_packages, setup
from setuptools.command.build_py import build_py
from setuptools.command.sdist import sdist
HERE = os.path.dirname(__file__)
def webpacked_command(command):
"""
Return a command that inherits from command, but adds webpack JS building
"""
class WebPackedCommand(command):
"""
Run npm webpack to generate appropriate output files before given command.
This generates all the js & css we need, and that is included via an
entry in MANIFEST.in
"""
description = "build frontend files with webpack"
def run(self):
"""
Call npm install & npm run webpack before packaging
"""
check_call(
["npm", "install", "--progress=false", "--unsafe-perm"],
cwd=HERE,
)
check_call(["npm", "run", "webpack"], cwd=HERE)
return super().run()
return WebPackedCommand
with open("README.md") as f:
readme = f.read()
setup(
name="jupyter-remote-desktop-proxy",
packages=find_packages(),
version='2.0.2.dev',
author="Jupyter Development Team",
author_email="[email protected]",
classifiers=[
"Intended Audience :: Developers",
"Intended Audience :: System Administrators",
"Intended Audience :: Science/Research",
"License :: OSI Approved :: BSD License",
"Programming Language :: Python",
"Programming Language :: Python :: 3",
],
description="Run a desktop environments on Jupyter",
entry_points={
'jupyter_serverproxy_servers': [
'desktop-websockify = jupyter_remote_desktop_proxy.setup_websockify:setup_websockify',
]
},
install_requires=[
'jupyter-server-proxy>=4.3.0',
],
include_package_data=True,
keywords=["Interactive", "Desktop", "Jupyter"],
license="BSD",
long_description=readme,
long_description_content_type="text/markdown",
platforms="Linux",
project_urls={
"Source": "https://github.com/jupyterhub/jupyter-remote-desktop-proxy/",
"Tracker": "https://github.com/jupyterhub/jupyter-remote-desktop-proxy/issues",
},
python_requires=">=3.8",
url="https://jupyter.org",
zip_safe=False,
cmdclass={
# Handles making sdists and wheels
"sdist": webpacked_command(sdist),
# Handles `pip install` directly
"build_py": webpacked_command(build_py),
},
data_files=[
(
'etc/jupyter/jupyter_server_config.d',
[
'jupyter-config/jupyter_server_config.d/jupyter_remote_desktop_proxy.json'
],
),
(
'etc/jupyter/jupyter_notebook_config.d',
[
'jupyter-config/jupyter_notebook_config.d/jupyter_remote_desktop_proxy.json'
],
),
],
)