Library recipes: build PyYAML's libyaml on Windows too
Maintainer thường phản hồi trong vòng 1 ngày
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
- Tính năng
- Độ rõ ràng
- Đặc tả rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Lĩnh vực
- build-system, ci-cd
Hướng nghiên cứu
Start with RECIPES["pyyaml"] and problem() in scripts/library_recipes.py, then build_libraries() and build_env() in scripts/gap_wheels.py, to see how the Linux recipe and its static-library check work. Add a Windows 3.15 win-amd64 entry built with CMake from the same pinned libyaml source, and extend the static check to reject .dll files. Done when tests/test_gap_wheels.py covers the new entry and the .dll check, two fork build runs give equal sha256s, the README is updated in three places, and the pytest command passes offline.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Since #33 PyYAML gets a gap wheel on Linux x86_64 (3.14t and 3.15), built against a pinned libyaml 0.2.6. On Windows it is still skipped: the recipe's targets are ["3.14t linux-x86_64", "3.15 linux-x86_64"], so for the Windows targets the plan says "needs libyaml, and there is no library recipe for this target". PyPI has no PyYAML wheel for 3.15 win-amd64 today (the tracker's scan of 2026-11-20: pyyaml 6.0.3, source).
Windows is where it matters most. Without a wheel, pip install pyyaml on Windows falls back to a pure-Python build if there's no compiler, silently, and every YAML load is many times slower; with a compiler and no libyaml it does the same. PyYAML is the 12th most-downloaded package on PyPI.
The README says what's missing: "Not covered yet: Windows (a recipe there needs MSVC build steps and a way to show the library to the package's build, and ./configure isn't one)".
Where
scripts/library_recipes.py:RECIPES["pyyaml"], andproblem(), which validates a recipe.scripts/gap_wheels.py:build_libraries()runs the steps and checks the result. Its shared-library check looks only for.sofiles:re.search(r"\.so(\.[0-9]+)*$", p.name).tests/test_gap_wheels.py: the recipe tests.
What to do
- Add a second recipe entry for PyYAML for
3.15 win-amd64(and the Windows on ARM targets if you can build for them; list only targets you built for), from the same source archive and sha256 as the Linux one. libyaml ships aCMakeLists.txt; PyYAML's own Windows wheels are built that way (readpackaging/build/in the PyYAML repo and link what you follow). Steps are fixed argument lists, for examplecmake -S . -B build -DBUILD_SHARED_LIBS=OFF -DCMAKE_INSTALL_PREFIX={prefix} ...,cmake --build build --config Release,cmake --install build --config Release.provides:include/yaml.handlib/yaml.lib. - Pin what the steps use.
cmakeon the runner image isn't pinned. Either record its version in the build's tool provenance (as the MSVC versions are,_msvc_tools()), so two builds with different cmake are refused, or install a pinned cmake wheel with a sha256 like the other tools inTOOL_HASHES. Say which in the PR. - Reproducibility: the Windows builds already pass
-BreprothroughCLandLINK(build_env()). Check the static library and the extension come out byte-identical in two runs. No/Zi, no PDB. - Show it to PyYAML's build:
envwithINCLUDEandLIBset to the prefix's folders (MSVC reads both), plusPYYAML_FORCE_LIBYAML=1.yaml.libis static, so the extension must be compiled withYAML_DECLARE_STATIC; find how PyYAML's own build passes it. - Extend the "must be static" check in
build_libraries()to Windows: a.dllunder the prefix fails the build, as a.sodoes on Linux. - The
import_checkis the Linux one. Staging already refuses a Windows wheel that imports a DLL a machine may lack (missing_dlls()); a statically linked libyaml adds none. - Update the README: the recipes table row, the "Not covered yet" sentence, and the sentence "PyYAML on Alpine or Windows ... are skipped".
You can't publish from a fork, and you don't need to. Run gap-wheel-build.yml in your fork for one pair twice and compare the two sha256s.
Done when:
- Tests in
tests/test_gap_wheels.pycover the new entry (problem()accepts it,for_pair()returns it for its Windows targets and the Linux one for the Linux targets,missing()is None there) and the.dllcheck. - The PR links two build runs from your fork for one Windows target with equal sha256s, and the output of the import check on that wheel.
- The README is updated in the three places.
uvx --python 3.14 [email protected]passes, offline.
- Ngôn ngữ chính
- Python
- Star
- 0
- Fork
- 1
- Merge trung bình
- 5 giờ 59 phút
- Pull request đã merge (30 ngày)
- 19
Chuẩn bị môi trường
Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.
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 wheelgap/wheels
-
documentation good first issue
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
Maintainer thường phản hồi trong vòng 1 ngày
-
good first issue
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
Maintainer thường phản hồi trong vòng 1 ngày
-
good first issue
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
Maintainer thường phản hồi trong vòng 1 ngày
-
enhancement help wanted
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 25/100
Maintainer thường phản hồi trong vòng 1 ngày
-
bug help wanted
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 35/100
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của wheelgap/wheels
Issue tương tự
-
flaky: test_fire_returns_thread_per_http_entry_on_head waits 5 s per dispatch worker on busy shardsĐang mởstatus/accepted type/bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 74/100
microsoft/apm#5309 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
bug vector-store
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 85/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 74/100
EverMind-AI/Raven#1413 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Tests: parallel pyinstallcheck runs oversubscribe the machine through nested TBB and BLAS poolsCó thể đã có người làm Có pull request liên kết đang mở hoặc đã được merge. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 86/100
ACCESS-NRI/containerised-environments-infra#143 ·
Maintainer thường phản hồi trong vòng 2 ngày