@@ -43,14 +43,16 @@ def run_command(cmd, shell=False, check=True):
4343 if check and proc .wait () != 0 :
4444 raise subprocess .CalledProcessError (proc .returncode , cmd )
4545
46- def pip_install (python_exe : Path , req_file : str , constraints : str , find_links : str , label : str ):
46+ def pip_install (python_exe : Path , req_file : str , constraints : str , find_links : str , label : str , options :[] ):
4747 if req_file and Path (req_file ).exists ():
4848 cmd = [
4949 str (python_exe ), "-m" , "pip" , "install" ,
5050 "-r" , req_file , "-c" , constraints ,
5151 "--pre" , "--no-index" , f"--find-links={ find_links } " ,
5252 "--upgrade" , "--no-warn-script-location"
5353 ]
54+ if options :
55+ cmd += options
5456 log_section (f"Pip-install { label } " )
5557 run_command (cmd )
5658 else :
@@ -218,7 +220,7 @@ def main():
218220 ("Pre" , args .pre_req ),
219221 ("Main" , args .requirements ),
220222 ]:
221- pip_install (target_python , req , args .constraints , args .find_links , label )
223+ pip_install (target_python , req , args .constraints , args .find_links , label , [ "--force-reinstall" ] )
222224
223225 log_section ("🙏 Step 4: Patch Winpython" )
224226 patch_winpython (target_python )
0 commit comments