diff --git a/tljh/installer.py b/tljh/installer.py index 6187d85..668f30c 100644 --- a/tljh/installer.py +++ b/tljh/installer.py @@ -256,11 +256,20 @@ def ensure_user_environment(user_requirements_txt_file): pypi_pkgs_to_upgrade, upgrade=True, ) + + # Install/upgrade the jupyterhub version in the user env based on the + # version specification used for the hub env. + # + with open(os.path.join(HERE, "requirements-hub-env.txt")) as f: + jh_version_spec = [l for l in f if l.startswith("jupyterhub>=")][0] + conda.ensure_pip_packages(USER_ENV_PREFIX, [jh_version_spec], upgrade=True) + + # Install user environment extras for initial installations + # if is_fresh_install: conda.ensure_pip_requirements( USER_ENV_PREFIX, os.path.join(HERE, "requirements-user-env-extras.txt"), - upgrade=True, ) if user_requirements_txt_file: diff --git a/tljh/requirements-user-env.txt b/tljh/requirements-user-env.txt deleted file mode 100644 index a9528e9..0000000 --- a/tljh/requirements-user-env.txt +++ /dev/null @@ -1,7 +0,0 @@ -# When tljh.installer runs, the users' environment as typically found in -# /opt/tljh/user, is installed or upgraded with these packages. -# -# Whats listed here should be only the unconditional requirements that we have in -# the user environment. -# -jupyterhub==4.*