DEVX-1: Extract reusable dev/CI tools from GRM into devx package #1

Merged
emil merged 435 commits from DEVX-1-fix-ci-python3 into master 2026-06-22 15:52:46 +00:00
3 changed files with 8 additions and 5 deletions
Showing only changes of commit 15f6837dc2 - Show all commits
+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: