mirror of
https://github.com/jupyterhub/jupyterhub.git
synced 2025-10-07 01:54:09 +00:00

- update references to default branch name in docs, workflows - use HEAD in github urls, which always works regardless of default branch name - fix petstore URLs since the old petstore links seem to have stopped working
22 lines
591 B
Python
22 lines
591 B
Python
#!/usr/bin/env python
|
|
import os
|
|
from subprocess import check_call
|
|
import sys
|
|
|
|
V = os.environ['JUPYTERHUB_VERSION']
|
|
|
|
pip_install = [
|
|
sys.executable, '-m', 'pip', 'install', '--no-cache', '--upgrade',
|
|
'--upgrade-strategy', 'only-if-needed',
|
|
]
|
|
if V in {'main', 'HEAD'}:
|
|
req = 'https://github.com/jupyterhub/jupyterhub/archive/HEAD.tar.gz'
|
|
else:
|
|
version_info = [ int(part) for part in V.split('.') ]
|
|
version_info[-1] += 1
|
|
upper_bound = '.'.join(map(str, version_info))
|
|
vs = '>=%s,<%s' % (V, upper_bound)
|
|
req = 'jupyterhub%s' % vs
|
|
|
|
check_call(pip_install + [req])
|