mirror of
https://github.com/jupyterhub/the-littlest-jupyterhub.git
synced 2025-12-18 21:54:05 +08:00
Require python 3.6+
This commit is contained in:
@@ -11,8 +11,9 @@ Constraints:
|
|||||||
|
|
||||||
- The entire script should be compatible with Python 3.6, which is the on
|
- The entire script should be compatible with Python 3.6, which is the on
|
||||||
Ubuntu 18.04+.
|
Ubuntu 18.04+.
|
||||||
- The script should parse in Python 3.5 as we print error messages on Ubuntu
|
- The script should parse in Python 3.5 as we print error messages for using
|
||||||
16.04+ that comes with Python 3.5 by default. This means no f-strings.
|
Ubuntu 16.04+ which comes with Python 3.5 by default. This means no
|
||||||
|
f-strings can be used.
|
||||||
- The script must depend only on stdlib modules, as no previous installation
|
- The script must depend only on stdlib modules, as no previous installation
|
||||||
of dependencies can be assumed.
|
of dependencies can be assumed.
|
||||||
|
|
||||||
@@ -191,6 +192,11 @@ def ensure_host_system_can_install_tljh():
|
|||||||
print('The Littlest JupyterHub requires Ubuntu 18.04 or higher')
|
print('The Littlest JupyterHub requires Ubuntu 18.04 or higher')
|
||||||
sys.exit(1)
|
sys.exit(1)
|
||||||
|
|
||||||
|
# Require Python 3.6+
|
||||||
|
if sys.version_info < (3, 6):
|
||||||
|
print("bootstrap.py must be run with at least Python 3.6")
|
||||||
|
sys.exit(1)
|
||||||
|
|
||||||
# Require systemd (systemctl is a part of systemd)
|
# Require systemd (systemctl is a part of systemd)
|
||||||
if not shutil.which('systemd') or not shutil.which('systemctl'):
|
if not shutil.which('systemd') or not shutil.which('systemctl'):
|
||||||
print("Systemd is required to run TLJH")
|
print("Systemd is required to run TLJH")
|
||||||
|
|||||||
Reference in New Issue
Block a user