pip_parse does not generate @pypi packages for Windows ARM64
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức phù hợp với người mới
- 45/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Ít trao đổi
- Công nghệ
- python
- Lĩnh vực
- build-system
Hướng nghiên cứu
Bắt đầu trong triển khai legacy của pip_parse tại @rules_python//python:pip.bzl, sau đó kiểm tra cách nó tạo ra external/pypi/requirements_with_markers.out.json và external/pypi/requirements.bzl. Theo dõi ánh xạ tên nền tảng và wheel-tag cho Windows ARM64, đồng thời so sánh các đường dẫn target_platforms và experimental_target_platforms; hoàn thành khi một cấu hình được hỗ trợ tạo ra mục nền tảng Windows ARM64 như mong đợi và các kho lưu trữ gói không rỗng.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Problem
I am trying to build TensorFlow on Windows ARM64 using Bazel/rules_python hermetic Python.
Platform:
- OS: Windows ARM64
- Target triple:
aarch64-pc-windows-msvc - Python: 3.13 ARM64
- Bazel: 7.7.0
- Build uses WORKSPACE / legacy
pip_parse, not bzlmod
TensorFlow initializes PyPI dependencies through pip_parse from:
load("@rules_python//python:pip.bzl", "package_annotation", "pip_parse")
pip_parse(
name = "pypi",
python_interpreter_target = "@python_3_13_host//:python",
requirements_lock = REQUIREMENTS_WITH_LOCAL_WHEELS,
envsubst = ["RULES_PYTHON_ENABLE_PIPSTAR"],
# tried adding target platform settings, see below
)
Observed behavior
The generated file:
external/pypi/requirements.bzl
contains no packages:
all_requirements = []
all_whl_requirements_by_package = {}
all_data_requirements = []
_packages = []
This causes Bazel analysis failures later for normal TensorFlow deps such as:
@pypi//wheel
@pypi//gast
because the @pypi repo is empty.
The generated marker file:
external/pypi/requirements_with_markers.out.json
contains platform mappings such as:
[
"linux_aarch64",
"linux_arm",
"linux_ppc",
"linux_riscv64",
"linux_s390x",
"linux_x86_64",
"osx_aarch64",
"osx_x86_64",
"windows_x86_64"
]
but it does not include:
windows_aarch64
windows_arm64
cp313_windows_aarch64
So Windows x64 works, but Windows ARM64 does not.
Things I tried
I patched the pip_parse call to include:
target_platforms = [
"{os}_{arch}",
"windows_aarch64",
]
but the generated requirements_with_markers.out.json still only listed windows_x86_64, not windows_aarch64, and requirements.bzl was still empty.
I also tried using the legacy-looking attribute:
experimental_target_platforms = [
"windows_aarch64",
]
and planned to try:
experimental_target_platforms = [
"cp313_windows_aarch64",
]
and:
experimental_target_platforms = [
"all",
]
but I’m not sure what the supported platform string should be for Windows ARM64 in legacy pip_parse.
Expected behavior
pip_parse should support Windows ARM64 / aarch64-pc-windows-msvc and generate non-empty @pypi repositories when requirements contain packages compatible with Windows ARM64.
At minimum, the generated platform marker evaluation should include the appropriate Windows ARM64 platform name, probably one of:
windows_aarch64
cp313_windows_aarch64
Questions
- What is the correct platform string for Windows ARM64 in
pip_parse? - Does legacy WORKSPACE
pip_parsesupport Windows ARM64 target platforms? - Should
target_platformsorexperimental_target_platformsbe used for WORKSPACEpip_parse? - Is
win_arm64wheel tag mapped towindows_aarch64anywhere in rules_python? - Is this expected to work with
RULES_PYTHON_ENABLE_PIPSTAR=0?
Reproduction context
This is from TensorFlow’s hermetic Python setup through rules_ml_toolchain:
pip_parse(
name = "pypi",
annotations = numpy_annotations,
python_interpreter_target = "@{}_host//:python".format(
get_toolchain_name_per_python_version("python"),
),
extra_hub_aliases = {
"numpy": ["numpy_headers"],
},
envsubst = ["RULES_PYTHON_ENABLE_PIPSTAR"],
requirements_lock = REQUIREMENTS_WITH_LOCAL_WHEELS,
extra_pip_args = extra_pip_args,
download_only = is_download_only,
)
The hermetic Python repository is correctly selecting:
python_3_13_aarch64-pc-windows-msvc
- Ngôn ngữ chính
- Starlark
- Star
- 690
- Fork
- 722
- Merge trung bình
- 1 ngày 55 phút
- Pull request đã merge (30 ngày)
- 38
Hướng dẫn đóng góp
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 bazel-contrib/rules_python
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
bazel-contrib/rules_python#4179 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
bazel-contrib/rules_python#4164 · 1 bình luận ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
bazel-contrib/rules_python#3821 ·
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 45/100
bazel-contrib/rules_python#4181 ·
-
Release 2.4.0 Đang mởtype: release
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 25/100
bazel-contrib/rules_python#4175 · 3 bình luận ·
Tất cả issue của bazel-contrib/rules_python
Issue tương tự
-
Name consistency Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
eellak/triplestore#65 · 1 bình luận ·
-
litertlm-android AAR ships no consumer ProGuard rules → "mid == null" SIGABRT in minified apps Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
google-ai-edge/LiteRT-LM#3739 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
-
area-Bzlmod team-ExternalDeps type: bug untriaged
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 65/100
bazelbuild/bazel#31291 · 2 bình luận ·
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
bradcypert/plum#53 ·