File tree Expand file tree Collapse file tree 1 file changed +7
-0
lines changed Expand file tree Collapse file tree 1 file changed +7
-0
lines changed Original file line number Diff line number Diff line change @@ -584,6 +584,13 @@ def create_pip_call(args: List[str]) -> List[str]:
584
584
585
585
if using_system_pip_installation_location ():
586
586
args = remove_options_and_arg (args , ["--target" , "--path" ])
587
+ elif "--target" in args or "--path" in args :
588
+ # If we are not running in some sort of container, and are instead trying to install to a
589
+ # specific directory, pip will complain because it doesn't know that we're effectively
590
+ # using this as a virtual env: it's not accessible to non-FreeCAD installations (at least,
591
+ # not without some extra work on the user's part). So add the --break-system-packages flag
592
+ # so pip will allow us to write to the --target directory
593
+ args .append ("--break-system-packages" )
587
594
588
595
if snap_package :
589
596
call_args = ["pip" , "--disable-pip-version-check" ]
You can’t perform that action at this time.
0 commit comments