setup.py: add automatic script generation

Use setuptools console_scripts functionality to create top level jupyter
& jupyterhub-single user entry point scripts on *nix, and executables on
Windows.

Signed-off-by: Alejandro del Castillo <alejandro.delcastillo@ni.com>
This commit is contained in:
Alejandro del Castillo
2018-11-14 11:12:27 -06:00
parent 767dce29f4
commit b1759c8882
3 changed files with 4 additions and 11 deletions

View File

@@ -1,4 +0,0 @@
#!/usr/bin/env python3
from jupyterhub.app import main
main()

View File

@@ -1,6 +0,0 @@
#!/usr/bin/env python3
from jupyterhub.singleuser import main
if __name__ == '__main__':
main()

View File

@@ -89,7 +89,6 @@ with open('README.md', encoding="utf8") as f:
setup_args = dict(
name = 'jupyterhub',
scripts = glob(pjoin('scripts', '*')),
packages = packages,
# dummy, so that install_data doesn't get skipped
# this will be overridden when bower is run anyway
@@ -121,6 +120,10 @@ setup_args = dict(
'localprocess = jupyterhub.spawner:LocalProcessSpawner',
'simple = jupyterhub.spawner:SimpleLocalProcessSpawner',
],
'console_scripts': [
'jupyterhub = jupyterhub.app:main',
'jupyterhub-singleuser = jupyterhub.singleuser:main',
]
},
classifiers = [
'Intended Audience :: Developers',