Closed agriyakhetarpal closed 6 months ago
Ah, I see that there have been issues with Zig on i386 before :) based on #8 and https://github.com/ziglang/zig/issues/537. I still think providing a binary through PyPI would be useful even if the release is not offering top-tier support for users, considering that the Downloads page has it.
I still think providing a binary through PyPI would be useful even if the release is not offering top-tier support for users, considering that the Downloads page has it.
Sure--happy to merge a PR!
I built 32-bit wheels, can you please confirm that these wheels work well? https://mega.nz/file/MlwliBoL#FtiKyeygLHczynTRKPpvexm-ET1clP-g4hHrIqaqZgY
I didn't test them on Windows but on a 32-bit wineprefix they work fine.
I think so, too. I don't have easy access to a Windows build :) thanks for the merge!
I've uploaded both 0.11.0 and 0.12.0 win32 wheels to PyPI.
https://pypi.org/project/ziglang/0.12.0/ https://pypi.org/project/ziglang/0.11.0/
Description
Hi! I see on https://ziglang.org/download/ that since versions v0.10.0 and later the Zig programming language has had 32-bit binaries, and it now regularly publishes binaries for development versions of v0.13.0 at the time of writing; I wonder if it would be possible to build 32-bit Windows wheels based on those binaries and ship them with PyPI as well.
Proposed implementation
I see that
make_wheels.py
is used to build wheels instead of the traditionalsetup.py
format, and no source distributions are distributed, as described in #2 – that makes sense.I think this should be done by:
x86-windows
key-value pair to theZIG_PYTHON_PLATFORMS
constant, andwin32
– which is the value ofsysconfig.get_platform()
, mostly, but it can be better extracted fromwheel.bdist.wheel.get_tag
in these lines: https://github.com/ziglang/zig-pypi/blob/33c05bb038fb2fc37cde1496e415dcbb1297bc6f/make_wheels.py#L130-L135urllib
and package the binary up into an extra wheel without ABI tags as usual.The command-line argument parser can then work as usual, just with a new available option.
Additional context
I would be happy to implement the changes myself here – they look quite minimal, and would be happy to get a chance to contribute :) I have decided to open an issue first to gauge thoughts from maintainers and core developers.
I'm using
zig cc
as a build-time dependency for my Python package for cross-compiling uses, where the absence of a 32-bit Windows wheel would break building off of the source distribution (since a source distribution isn't planned or worth any use for Zig and just wheels are uploaded). I can very well remove that breakage with a conditional dependency specifier in the form of something liketo restrict it for just this platform and architecture (while keeping it for others), but since PyPI's Zig isn't being built from source, I thought I should really propose the addition here.