@@ -124,9 +124,7 @@ def ensure_jupyterhub_package(prefix):
124
124
'libcurl4-openssl-dev' ,
125
125
'build-essential'
126
126
])
127
- conda .ensure_pip_packages (prefix , [
128
- 'pycurl==7.*'
129
- ])
127
+ conda .ensure_pip_packages (prefix , ['pycurl==7.*' ], upgrade = True )
130
128
131
129
conda .ensure_pip_packages (
132
130
prefix ,
@@ -141,6 +139,7 @@ def ensure_jupyterhub_package(prefix):
141
139
"jupyterhub-idle-culler==1.*" ,
142
140
"git+https://github.com/yuvipanda/jupyterhub-configurator@317759e17c8e48de1b1352b836dac2a230536dba"
143
141
],
142
+ upgrade = True ,
144
143
)
145
144
traefik .ensure_traefik_binary (prefix )
146
145
@@ -193,20 +192,28 @@ def ensure_user_environment(user_requirements_txt_file):
193
192
conda .install_miniconda (installer_path , USER_ENV_PREFIX )
194
193
conda_version = '4.10.3'
195
194
196
- conda .ensure_conda_packages (USER_ENV_PREFIX , [
197
- # Conda's latest version is on conda much more so than on PyPI.
198
- 'conda==' + conda_version ,
199
- 'mamba==' + mambaforge_mamba_version ,
200
- ])
195
+ conda .ensure_conda_packages (
196
+ USER_ENV_PREFIX ,
197
+ [
198
+ # Conda's latest version is on conda much more so than on PyPI.
199
+ 'conda==' + conda_version ,
200
+ 'mamba==' + mambaforge_mamba_version ,
201
+ ],
202
+ )
201
203
202
204
conda .ensure_pip_requirements (
203
205
USER_ENV_PREFIX ,
204
206
os .path .join (HERE , 'requirements-base.txt' ),
207
+ upgrade = True ,
205
208
)
206
209
207
210
if user_requirements_txt_file :
208
211
# FIXME: This currently fails hard, should fail soft and not abort installer
209
- conda .ensure_pip_requirements (USER_ENV_PREFIX , user_requirements_txt_file )
212
+ conda .ensure_pip_requirements (
213
+ USER_ENV_PREFIX ,
214
+ user_requirements_txt_file ,
215
+ upgrade = True ,
216
+ )
210
217
211
218
212
219
def ensure_admins (admin_password_list ):
@@ -313,7 +320,7 @@ def setup_plugins(plugins=None):
313
320
"""
314
321
# Install plugins
315
322
if plugins :
316
- conda .ensure_pip_packages (HUB_ENV_PREFIX , plugins )
323
+ conda .ensure_pip_packages (HUB_ENV_PREFIX , plugins , upgrade = True )
317
324
318
325
# Set up plugin infrastructure
319
326
pm = pluggy .PluginManager ('tljh' )
@@ -342,7 +349,11 @@ def run_plugin_actions(plugin_manager):
342
349
logger .info ('Installing {} hub pip packages collected from plugins: {}' .format (
343
350
len (hub_pip_packages ), ' ' .join (hub_pip_packages )
344
351
))
345
- conda .ensure_pip_packages (HUB_ENV_PREFIX , hub_pip_packages )
352
+ conda .ensure_pip_packages (
353
+ HUB_ENV_PREFIX ,
354
+ hub_pip_packages ,
355
+ upgrade = True ,
356
+ )
346
357
347
358
# Install conda packages
348
359
conda_packages = list (set (itertools .chain (* hook .tljh_extra_user_conda_packages ())))
@@ -358,7 +369,11 @@ def run_plugin_actions(plugin_manager):
358
369
logger .info ('Installing {} user pip packages collected from plugins: {}' .format (
359
370
len (user_pip_packages ), ' ' .join (user_pip_packages )
360
371
))
361
- conda .ensure_pip_packages (USER_ENV_PREFIX , user_pip_packages )
372
+ conda .ensure_pip_packages (
373
+ USER_ENV_PREFIX ,
374
+ user_pip_packages ,
375
+ upgrade = True ,
376
+ )
362
377
363
378
# Custom post install actions
364
379
hook .tljh_post_install ()
0 commit comments