Update PY_PYTHON env var on windows with installed version if update-environment is true
Personne n'a encore pris cette issue.
Évaluation
- Difficulté
- 3/5
- Temps estimé
- 1-2 jours
- Accessibilité débutants
- 48/100
- Type d'issue
- Fonctionnalité
- Clarté
- Plutôt claire
- Activité
- À l'abandon
- Stack technique
- github-actions, python, typescript
- Domaine
- devops, operating-systems
Piste de recherche
Commencez dans src/find-python.ts, autour de la gestion de update-environment mentionnée dans l’issue, et suivez la manière dont les variables d’environnement des versions installées sont mises à jour sous Windows. La modification est terminée lorsque update-environment définit également PY_PYTHON sur la version installée demandée afin que le lanceur py de Windows la sélectionne.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Description
Description:
The update-environment flag updates seems to update a bunch of env variables to point at the newly installed version (cypthon example: https://github.com/actions/setup-python/blob/main/src/find-python.ts#L111).
Could it also add the PY_PYTHON=<version> on Windows whenever update-environment is true? This will make the default version for the Windows py launcher match the one requested - even if the runner has another version already installed.
Justification:
In short: make sure that py <script.py> runs on the version of python that you just installed with setup-python.
I bumped into this because we had some scripts running on a windows runner using py <script.py> in an action. The runner updated, everything broke, and we noticed that even though setup-python is installing everything correctly - if another version is there (in this case a newer version) running anything with py can use the other version instead of the one that was just installed by setup-python.
Are you willing to submit a PR?
Happy to! I just didn't want to to put time into it if the feature is not a good idea / I'm missing something. Setting the PY_PYTHON env var in the actions worked for my specific case, though I'm wondering if to do it in general it should set any other py launcher related variables to match the newly installed python too.
- Langage dominant
- TypeScript
- Étoiles
- 2.2k
- Forks
- 739
- Merge moyen
- 6 j 18 h
- PR mergées (30 j)
- 1
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.
Autres issues de actions/setup-python
-
bug
Difficulté 4/5 3-5 jours Accessibilité débutants 55/100
actions/setup-python#1348 · 5 commentaires ·
-
feature request
Difficulté 5/5 Plus d'une semaine Accessibilité débutants 35/100
actions/setup-python#1346 · 12 commentaires ·
-
feature request
Difficulté 3/5 1-2 jours Accessibilité débutants 58/100
actions/setup-python#1308 · 8 commentaires ·
-
feature request
Difficulté 2/5 1-3 heures Accessibilité débutants 35/100
actions/setup-python#1301 · 5 commentaires ·
-
feature request
Difficulté 4/5 3-5 jours Accessibilité débutants 55/100
actions/setup-python#1294 · 3 commentaires · 2 réactions ·
Toutes les issues de actions/setup-python
Issues similaires
-
blocklist removal
Difficulté 2/5 1-3 heures Accessibilité débutants 65/100
MetaMask/eth-phishing-detect#296544 ·
-
Difficulté 2/5 1-3 heures Accessibilité débutants 70/100
pastelsky/bundlephobia#1122 ·
-
Difficulté 2/5 1-3 heures Accessibilité débutants 70/100
-
category/development priority/P2 scope/file-operations scope/testing type/enhancement
Difficulté 2/5 1-3 heures Accessibilité débutants 75/100
-
Enatega Customer and Rider app: Add-ons price is not visible to customer after order is placed. Ouverte
Difficulté 2/5 1-3 heures Accessibilité débutants 75/100