actions / actions/setup-python
Extend PKG_CONFIG_PATH rather than overwriting it
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:
As of now, the setup-python action overwrites the PKG_CONFIG_PATH variable during its execution, which can lead to errors if this variable has already been set to a specific value (which is then no longer available). PKG_CONFIG_PATH works as the normal PATH does (from the man page of pkg-config)
PKG_CONFIG_PATH
A colon-separated list of high-priority directories where pc(5) files are looked up.
It would therefore be a good idea to instead extend PKG_CONFIG_PATH by adding the new directory to the existing value if one is present in the environment. This will make both existing and new pc files available (We would not want to overwrite PATH either, would we?)
Justification:
I realized this issue after debugging session of a CI pipeline which had a global
env:
PKG_CONFIG_PATH: '/special/path'
attached to a given workflow. After installing python using setup-python the python dependencies (which included a native library with a pc file) could not be installed any more, since that variable had been overwritten. This is a rather insidious error which is really hard to find.
Are you willing to submit a PR?
Working on a PR.
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
Das Issue identifiziert die Handhabung von PKG_CONFIG_PATH durch setup-python als Einstiegspunkt; untersuche den Umgebungs- und Pfadschreibcode der Action sowie alle relevanten Tests. Überprüfe das Verhalten mit einem vorhandenen PKG_CONFIG_PATH und bestätige, dass sowohl die bisherigen als auch die generierten Verzeichnisse weiterhin verfügbar bleiben. Die Arbeit ist bereits durch PR #1242 repräsentiert.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- github-actions, typescript
- Bereich
- ci-cd, devops
- Issue-Typ
- Bug
- Schwierigkeit
- 2/5
- Geschätzter Aufwand
- 1-3 Stunden
- Aktivitätsstatus
- Veraltet
- Klarheit
- Klar beschrieben
- Anfängerfreundlichkeit
- 20/100