Files
jupyterhub/singleuser/install_jupyterhub
Min RK facde96425 build jupyterhub/singleuser along with other images
got lost in the migration to GHA docker builds
2021-11-24 21:15:59 +01:00

25 lines
496 B
Python

#!/usr/bin/env python
import os
from subprocess import check_call
import sys
version = os.environ['JUPYTERHUB_VERSION']
pip_install = [
sys.executable,
'-m',
'pip',
'install',
'--no-cache',
'--upgrade',
'--upgrade-strategy',
'only-if-needed',
]
if version.startswith("git:"):
ref = version.partition(":")[-1]
req = f"https://github.com/jupyterhub/jupyterhub/archive/{ref}.tar.gz"
else:
req = f"jupyterhub=={version}"
check_call(pip_install + [req])