DEVX-18: fix: add --ignore-installed to pip in CI to bypass debian packages
Post-merge / detect-type (push) Successful in 9s
Post-merge / validate-commit-msg (push) Successful in 10s
Post-merge / configure-repo (push) Successful in 13s
Post-merge / release (push) Successful in 45s
Post-merge / vikunja (push) Successful in 11s
Post-merge / sync-wiki (push) Successful in 39s
Post-merge / badges (push) Successful in 42s

This commit was merged in pull request #32.
This commit is contained in:
2026-06-23 22:27:35 +00:00
parent b4dda91e24
commit 15f6837dc2
3 changed files with 8 additions and 5 deletions
+1 -1
View File
@@ -1 +1 @@
DEVX-17
DEVX-18
+4 -3
View File
@@ -29,10 +29,11 @@ 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")
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.
# In CI (system Python), --break-system-packages allows installing to
# system site-packages, and --ignore-installed avoids uninstall failures
# for debian-installed packages (e.g. platformdirs) that lack RECORD files.
if os.environ.get("PIP_BREAK_SYSTEM_PACKAGES") == "1":
cmd.append("--break-system-packages")
cmd.extend(["--break-system-packages", "--ignore-installed"])
_run(cmd)
+3 -1
View File
@@ -52,7 +52,9 @@ class TestInstallPythonDeps:
def test_install_with_break_system_packages(self, mock_run: MagicMock) -> None:
with patch.dict(os.environ, {"PIP_BREAK_SYSTEM_PACKAGES": "1"}):
_install_python_deps(".venv/bin", "ci")
mock_run.assert_called_once_with([".venv/bin/pip", "install", "-e", ".[ci]", "--break-system-packages"])
mock_run.assert_called_once_with(
[".venv/bin/pip", "install", "-e", ".[ci]", "--break-system-packages", "--ignore-installed"]
)
class TestInstallPreCommitHooks: