Keep apt gi by pinning Linux setup to system Python.
Some checks failed
Mirror to Gitea / mirror (push) Has been cancelled
Some checks failed
Mirror to Gitea / mirror (push) Has been cancelled
uv sync --active was honoring .python-version (3.12) and replacing the system-site-packages venv, so python3-gi from Ubuntu's interpreter was no longer importable. Co-authored-by: Diaco Soltanpour <s-diaco@users.noreply.github.com>
This commit is contained in:
18
tests/test_setup_linux.py
Normal file
18
tests/test_setup_linux.py
Normal file
@@ -0,0 +1,18 @@
|
||||
from pathlib import Path
|
||||
|
||||
|
||||
def test_setup_linux_pins_system_python_for_uv_sync():
|
||||
script = Path("desktop/setup_linux.sh").read_text(encoding="utf-8")
|
||||
|
||||
assert "uv venv --python /usr/bin/python3 --no-managed-python --system-site-packages" in script
|
||||
|
||||
sync_lines = [
|
||||
line.strip()
|
||||
for line in script.splitlines()
|
||||
if line.strip().startswith("uv sync")
|
||||
]
|
||||
assert sync_lines == [
|
||||
"uv sync --python /usr/bin/python3 --no-managed-python --python-preference only-system"
|
||||
]
|
||||
assert "uv sync --active" not in script
|
||||
assert "include-system-site-packages = true" in script
|
||||
Reference in New Issue
Block a user