Repository navigation
Fix Windows wheel architecture detection - #498
CAOShurong wants to merge 2 commits into
Conversation
|
Perhaps I'm not understanding the issue. We have a test suite for Windows x86, x64, and arm64, and they are all green. I have personally tested each release on Windows x64 and arm64, which also seems to work. Could you explain specifically which combinations of features does not work? |
|
The failing case is a locally built, non-editable wheel with default settings, not the published release wheels. On current master python -m pip wheel . --no-deps --no-build-isolation -w distThe resulting The existing CI installs Native x86/ARM64 runs and the reporter's original uv project were not tested; the additional architecture cases are setup-selection regressions, not native-platform results. |
|
So the official wheels I build are fine, but your issue is, that the build script could be improved? Presumably you stumbled upon this while trying to build your own wheels. Why did you want to do that, is there anything wrong with the official wheels? |
|
Yes—this is a defect in the default source-build path, not a claim that the official release wheels are broken. The motivating case is #485: The PR makes that default selection work for source installations too. The original uv project itself was not tested here. |
|
The tests are cool, thank you. However, they currently break the CI, which is of course not acceptable. I don't think I understand the purpose of the changes to setup.py, to be honest. And they seem to introduce a regression for x64 Python running on Arm Windows (which is very common). |
|
The CI failure was For x64 Python on ARM64 Windows, |
Fixes #485.
With
_soundfile_datainitialized, the default Windows source build looks forlibsndfile_64bit.dllorlibsndfile_32bit.dll, while the bundled libraries are namedlibsndfile_x64.dllandlibsndfile_x86.dll. The resulting wheel omits the DLL. Selectx64,x86orarm64from the interpreter platform, using the same mapping assoundfile.py, and derive the wheel tag from that selection. Explicit cross-build targets remain supported.For x64 Python running on ARM64 Windows, the interpreter platform is
win-amd64: the package needs the x64 DLL andwin_amd64tag, even whenplatform.machine()reports ARM64. The parameterized tests cover that case and x86 Python on ARM64; native execution on those hosts was not tested locally.The packaging tests stub the build-tool entry points instead of importing setuptools at collection time. This fixes the reported CI failure in environments where build dependencies exist only inside pip's isolated build environment.
Validation of the follow-up: 19 packaging cases and the full 358-test suite pass on Windows / Python 3.13 in a fresh environment without setuptools. All 358 tests also pass against a non-editable wheel installed outside the source checkout; the wheel contains
libsndfile_x64.dll. Both full runs report 16 CFFI callback warnings. New upstream CI is pending.