actions / actions/setup-python
Add "Externally Managed Environments" support to block global package installations via pip
Dieses Issue hat noch niemand übernommen.
- Vorherrschende Sprache
- TypeScript
- Sterne
- 2.2k
- Forks
- 739
- Ø Merge
- 6 T. 18 Std.
- Gemergte PRs (30 T.)
- 1
Beschreibung
Description:
To prevent system package breakage, many Linux distributions are now restricting pip install to virtual environments or uv environments (something private either way). In self-hosted environments, especially when using ephemeral runners, the hosted tools cache functionality is critical for scaling.
The current methodology allows a pip install to install directly to the cached directory for a given Python after installation, which leads to potentially broken dependency trees and all other kinds of errors if developers are not careful with their package installs. It can also lead to weird race conditions in the same way.
I propose a new input for actions/setup-python that creates the EXTERNALLY-MANAGED file right before a version of Python is marked as available (e.g. creation of the x64.complete file) that would block global pip installs.
Justification:
Did all of this in the above. Didn't read the template first.
Are you willing to submit a PR?
Absolutely. This is more of a RFC to gauge the level of interest here.
Beitragsleitfaden
Für dieses Repository ist kein Beitragsleitfaden indexiert
Erste Schritte
- Lies das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreib ins Issue, dass du es übernimmst — das erspart doppelte Arbeit.
- Forke das Repository und arbeite in einem Branch.
- Öffne einen Pull Request, der die Issue-Nummer nennt.
Rechercherichtung
Lies zunächst den setup-python tool-cache-Pfad, der eine installierte Python-Version als verfügbar kennzeichnet, und prüfe anschließend die verlinkte Spezifikation für extern verwaltete Umgebungen. Ermittle, wie der Marker erstellt werden sollte, bevor die Verfügbarkeit erfasst wird, und welche bestehenden Tests zwischengespeicherte Python-Installationen abdecken. Als erledigt gilt die Aufgabe, wenn globale pip-Installationen für den zwischengespeicherten Interpreter blockiert werden, ohne unterstützte virtual-environment- oder uv-Workflows zu beeinträchtigen.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- python, typescript
- Bereich
- ci-cd, devops, tooling
- Issue-Typ
- Feature
- Schwierigkeit
- 4/5
- Geschätzter Aufwand
- 3-5 Tage
- Aktivitätsstatus
- Veraltet
- Klarheit
- Größtenteils klar
- Anfängerfreundlichkeit
- 35/100