Update PY_PYTHON env var on windows with installed version if update-environment is true
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 3/5
- Thời gian dự kiến
- 1-2 ngày
- Mức phù hợp với người mới
- 48/100
- Loại issue
- Tính năng
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Đình trệ
- Công nghệ
- github-actions, python, typescript
- Lĩnh vực
- devops, operating-systems
Hướng nghiên cứu
Bắt đầu trong src/find-python.ts, tại phần xử lý update-environment được đề cập trong issue, và theo dõi cách các biến môi trường của các phiên bản đã cài đặt được cập nhật trên Windows. Thay đổi hoàn tất khi update-environment cũng đặt PY_PYTHON thành phiên bản đã cài đặt được yêu cầu để trình khởi chạy py của Windows chọn phiên bản đó.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
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.
- Ngôn ngữ chính
- TypeScript
- Star
- 2.2k
- Fork
- 739
- Merge trung bình
- 6 ngày 18 giờ
- Pull request đã merge (30 ngày)
- 1
Hướng dẫn đóng góp
Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của actions/setup-python
-
bug
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 55/100
actions/setup-python#1348 · 5 bình luận ·
-
feature request
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 35/100
actions/setup-python#1346 · 12 bình luận ·
-
feature request
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 58/100
actions/setup-python#1308 · 8 bình luận ·
-
feature request
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 35/100
actions/setup-python#1301 · 5 bình luận ·
-
feature request
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 55/100
actions/setup-python#1294 · 3 bình luận · 2 reaction ·
Tất cả issue của actions/setup-python
Issue tương tự
-
blocklist removal
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 65/100
MetaMask/eth-phishing-detect#296544 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
pastelsky/bundlephobia#1122 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
-
category/development priority/P2 scope/file-operations scope/testing type/enhancement
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
-
Enatega Customer and Rider app: Add-ons price is not visible to customer after order is placed. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100