bazel-contrib / bazel-contrib/rules_python
rules_python 1.6 cannot find python 3 (local toolchain)
- Ngôn ngữ chính
- Starlark
- Star
- 688
- Fork
- 721
- Merge trung bình
- 15 giờ 7 phút
- Pull request đã merge (30 ngày)
- 76
Mô tả
# 🐞 bug report
### Affected Rule
`rules_python/tools/wheelmaker`
### Is this a regression?
We did not encounter this in 1.4.2: https://github.com/protocolbuffers/protobuf/actions/runs/17471667264/job/49621377398
### Description
I upgraded protobuf's rules_python version to 1.6 from 1.4.2. I'm now running into an issue when trying to mirror module.bazel deltas to WORKSPACE.
It looks like rules_python is having difficulty locating python3 for localtoolchains after updating to 1.6.
## 🔬 Minimal Reproduction
https://github.com/protocolbuffers/protobuf/pull/23341
## 🔥 Exception or Error
```
File "/workspace/_build/out/sandbox/processwrapper-sandbox/1203/execroot/com_google_protobuf/bazel-out/k8-opt-exec-ST-a828a81199fe/bin/external/rules_python/tools/wheelmaker", line 411, in _RunExecv
os.execv(python_program, argv)
FileNotFoundError: [Errno 2] No such file or directory: '/usr/local/bin/python3'
INFO: From Compiling upb_generator/reflection/header.cc [for tool]:
In file included from upb_generator/reflection/header.cc:15:
In file included from bazel-out/k8-opt-exec-ST-a828a81199fe/bin/src/google/protobuf/compiler/_virtual_includes/code_generator/google/protobuf/compiler/code_generator.h:2
```
## 🌍 Your Environment
**Operating System:**
Linux
**Output of `bazel version`:**
bzl 7.*, 8.*
**Rules_python version:**
1.6.0
Passing all but 1 orthogonal test in 1.4.2: https://github.com/protocolbuffers/protobuf/actions/runs/17471667264/job/49621377398
Failing a lot of Linux in 1.6: https://github.com/protocolbuffers/protobuf/actions/runs/17469109780/job/49612587161?pr=23341
Hướng dẫn đóng góp
Hướng nghiên cứu
Bắt đầu với rules_python/tools/wheelmaker và tái hiện lỗi bằng PR protobuf được liên kết trong issue, so sánh rules_python 1.4.2 với 1.6.0 và thiết lập module.bazel-to-WORKSPACE. Kiểm tra các lỗi CI Linux và đường dẫn toolchain cục bộ được hiển thị trong traceback; hoàn tất khi các bản build Linux bị ảnh hưởng tìm thấy Python 3 và hồi quy được bao phủ bởi các bài kiểm thử vượt qua.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Đánh giá
- Công nghệ
- python
- Lĩnh vực
- build-system
- Loại issue
- Lỗi
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức độ hoạt động
- Đình trệ
- Độ rõ ràng
- Khá rõ ràng
- Mức phù hợp với người mới
- 35/100