DEVX-17: fix: pass --break-system-packages to pip in CI environments
This commit is contained in:
@@ -28,7 +28,12 @@ def _run(cmd: list[str]) -> None:
|
||||
def _install_python_deps(bin_dir: str, extras: str = "dev") -> None:
|
||||
"""Install the project with the specified extras in editable mode."""
|
||||
pip = str(Path(bin_dir) / "pip")
|
||||
_run([pip, "install", "-e", f".[{extras}]"])
|
||||
cmd = [pip, "install", "-e", f".[{extras}]"]
|
||||
# In CI (system Python), --break-system-packages allows upgrading
|
||||
# debian-installed packages (e.g. platformdirs) that lack RECORD files.
|
||||
if os.environ.get("PIP_BREAK_SYSTEM_PACKAGES") == "1":
|
||||
cmd.append("--break-system-packages")
|
||||
_run(cmd)
|
||||
|
||||
|
||||
def _install_pre_commit_hooks(bin_dir: str) -> None:
|
||||
|
||||
Reference in New Issue
Block a user