actions / actions/setup-python
Extend PKG_CONFIG_PATH rather than overwriting it
Personne n'a encore pris cette issue.
- Langage dominant
- TypeScript
- Étoiles
- 2.2k
- Forks
- 739
- Merge moyen
- 6 j 18 h
- PR mergées (30 j)
- 1
Description
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.
Guide de contribution
Aucun guide de contribution indexé pour ce dépôt
Par où commencer
- Lisez l'issue en entier, puis le guide de contribution du projet.
- Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
- Forkez le dépôt et travaillez sur une branche.
- Ouvrez une pull request qui référence le numéro de l'issue.
Piste de recherche
L’issue identifie la gestion de PKG_CONFIG_PATH par setup-python comme point d’entrée ; examine le code de l’action qui concerne l’environnement et l’écriture des chemins, ainsi que tous les tests pertinents. Vérifie le comportement avec un PKG_CONFIG_PATH existant et confirme que les répertoires précédents et générés restent tous deux disponibles. Le travail est déjà représenté par PR #1242.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Évaluation
- Stack technique
- github-actions, typescript
- Domaine
- ci-cd, devops
- Type d'issue
- Bug
- Difficulté
- 2/5
- Temps estimé
- 1-3 heures
- Activité
- À l'abandon
- Clarté
- Clairement spécifiée
- Accessibilité débutants
- 20/100