Move xstartup file into package

Removes need for that step in postBuild
This commit is contained in:
YuviPanda 2019-10-29 14:13:14 -07:00
parent 8b5bbd03a4
commit 58750b5499
4 changed files with 9 additions and 11 deletions

View File

@ -1,6 +1,8 @@
import os
HERE = os.path.dirname(os.path.abspath(__file__))
def setup_desktop():
VNC_APPLICATION_DIR = os.path.join(os.getenv('CONDA_DIR'), 'vnc')
return {
@ -13,7 +15,7 @@ def setup_desktop():
'--',
VNC_APPLICATION_DIR + '/bin/vncserver',
'-verbose',
'-xstartup', VNC_APPLICATION_DIR + '/xstartup',
'-xstartup', os.path.join(HERE, 'share/xstartup'),
'-geometry', '1024x768',
'-SecurityTypes', 'None',
'-rfbunixpath', VNC_APPLICATION_DIR + '/socket',

0
share/xstartup → jupyter_desktop/share/xstartup Normal file → Executable file
View File

View File

@ -25,7 +25,4 @@ sed -i.bak \
noVNC-1.1.0/vnc_lite.html
cp $REPO_DIR/share/xstartup .
chmod +x xstartup
pip install $REPO_DIR

View File

@ -1,17 +1,16 @@
import setuptools
from setuptools import setup, find_packages
setuptools.setup(
setup(
name="jupyter-desktop-server",
# py_modules rather than packages, since we only have 1 file
py_modules=['jupyter_desktop'],
packages=find_packages(),
version='0.1',
entry_points={
'jupyter_serverproxy_servers': [
'desktop = jupyter_desktop:setup_desktop',
]
},
install_requires=['jupyter-server-proxy'],
package_data={
'jupyter_desktop': ['desktop/*'],
},
include_package_data=True,
zip_safe=False
)