File tree Expand file tree Collapse file tree 2 files changed +10
-2
lines changed Expand file tree Collapse file tree 2 files changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -178,15 +178,21 @@ def install_user_requirements(self):
178
178
break
179
179
180
180
if requirements_file_path :
181
- self . build_env . run (
181
+ args = [
182
182
'python' ,
183
183
self .venv_bin (filename = 'pip' ),
184
184
'install' ,
185
- '--upgrade' ,
185
+ ]
186
+ if self .project .has_feature (Feature .PIP_ALWAYS_UPGRADE ):
187
+ args += ['--upgrade' ]
188
+ args += [
186
189
'--exists-action=w' ,
187
190
'--cache-dir' ,
188
191
self .project .pip_cache_path ,
189
192
'-r{0}' .format (requirements_file_path ),
193
+ ]
194
+ self .build_env .run (
195
+ * args ,
190
196
cwd = self .checkout_path ,
191
197
bin_path = self .venv_bin ()
192
198
)
Original file line number Diff line number Diff line change @@ -991,10 +991,12 @@ def add_features(sender, **kwargs):
991
991
# may be added by other packages
992
992
USE_SPHINX_LATEST = 'use_sphinx_latest'
993
993
USE_SETUPTOOLS_LATEST = 'use_setuptools_latest'
994
+ PIP_ALWAYS_UPGRADE = 'pip_always_upgrade'
994
995
995
996
FEATURES = (
996
997
(USE_SPHINX_LATEST , _ ('Use latest version of Sphinx' )),
997
998
(USE_SETUPTOOLS_LATEST , _ ('Use latest version of setuptools' )),
999
+ (PIP_ALWAYS_UPGRADE , _ ('Always run pip install --upgrade' )),
998
1000
)
999
1001
1000
1002
project = models .ForeignKey (
You can’t perform that action at this time.
0 commit comments