Stop installing `<PROJECT>_PIP_REQUIREMENTS` into system Python with `run-task`
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 35/100
Direzione di ricerca
Locate the run-task entry point that handles the _PIP_REQUIREMENTS variable and inspect how it installs the cloned repository's requirements. Compare the virtualenv and non-system-Python approaches described in the issue, then verify that bootstrapping works on Debian 12 without installing into system Python.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
When a repo sets the <PROJECT>_PIP_REQUIREMENTS variable, run-task will automatically install the requirements file after cloning the repo. This is primarily used for bootstrapping Taskgraph in the Decision task, but can also be used for other things.
We recently upgraded the image to Debian 12, which includes Python 3.11. This version of Python fails when you attempt to pip install into the system Python:
[pip-install 2023-12-05T21:39:50.324Z] × This environment is externally managed
[pip-install 2023-12-05T21:39:50.324Z] ╰─> To install Python packages system-wide, try apt install
[pip-install 2023-12-05T21:39:50.324Z] python3-xyz, where xyz is the package you are trying to
[pip-install 2023-12-05T21:39:50.324Z] install.
[pip-install 2023-12-05T21:39:50.324Z]
[pip-install 2023-12-05T21:39:50.324Z] If you wish to install a non-Debian-packaged Python package,
[pip-install 2023-12-05T21:39:50.324Z] create a virtual environment using python3 -m venv path/to/venv.
[pip-install 2023-12-05T21:39:50.324Z] Then use path/to/venv/bin/python and path/to/venv/bin/pip. Make
[pip-install 2023-12-05T21:39:50.324Z] sure you have python3-full installed.
[pip-install 2023-12-05T21:39:50.324Z]
[pip-install 2023-12-05T21:39:50.324Z] If you wish to install a non-Debian packaged Python application,
[pip-install 2023-12-05T21:39:50.324Z] it may be easiest to use pipx install xyz, which will manage a
[pip-install 2023-12-05T21:39:50.324Z] virtual environment for you. Make sure you have pipx installed.
[pip-install 2023-12-05T21:39:50.324Z]
[pip-install 2023-12-05T21:39:50.324Z] See /usr/share/doc/python3.11/README.venv for more information.
We'll work around this by passing --break-system-packages for now (this is probably fine anyway, especially with Docker). But it highlights some poor behaviour. It would be better to create a virtualenv first or use a non-system Python (perhaps installed via pyenv).
- Lingua principale
- Python
- Stelle
- 26
- Fork
- 55
- Merge medio
- 2g 6m
- PR unite (30g)
- 15
Guida per i contributori
Apri la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di taskcluster/taskgraph
-
Dependency Dashboard Aperta
Difficoltà 5/5 Più di una settimana Idoneità per principianti 20/100
taskcluster/taskgraph#952 ·
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 35/100
taskcluster/taskgraph#915 ·
-
feature
Difficoltà 3/5 1-2 giorni Idoneità per principianti 35/100
taskcluster/taskgraph#911 · 1 commento ·
-
Difficoltà 3/5 1-2 giorni Idoneità per principianti 45/100
taskcluster/taskgraph#882 ·
-
Further optimize Git clones Aperta
Difficoltà 5/5 Più di una settimana Idoneità per principianti 35/100
taskcluster/taskgraph#865 · 1 commento ·
Tutte le issue di taskcluster/taskgraph
Issue simili
-
enhancement
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100
canonical/paas-charm#368 · 1 commento ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
-
tech debt
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
-
addition to tracking list Aperta
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 90/100
StevenBlack/hosts#3256 ·
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 90/100
qualcomm/qai-appbuilder#275 ·