ziglang/zig-pypi

Publish wheels for musllinux

zmanji opened this issue · 1 comments

On Alpine linux running:

pip install 'ziglang==0.10.0'

Fails with:

ERROR: Could not find a version that satisfies the requirement ziglang==0.10.0 (from versions: 0.0.0)
ERROR: No matching distribution found for ziglang==0.10.0

I think this is because the publishing script only releases manylinux wheels and not musllinux wheels

zig-pypi/make_wheels.py

Lines 115 to 122 in 8d37e95

for zig_platform, python_platform in {
'windows-x86_64': 'win_amd64',
'macos-x86_64': 'macosx_10_9_x86_64',
'macos-aarch64': 'macosx_11_0_arm64',
'linux-i386': 'manylinux_2_12_i686.manylinux2010_i686',
'linux-x86_64': 'manylinux_2_12_x86_64.manylinux2010_x86_64',
'linux-armv7a': 'manylinux_2_17_armv7l.manylinux2014_armv7l',
'linux-aarch64': 'manylinux_2_17_aarch64.manylinux2014_aarch64',

Since the linux- binaries published on the zig website are statically linked I think changing

    'linux-x86_64':   'manylinux_2_12_x86_64.manylinux2010_x86_64',

to

    'linux-x86_64':   'manylinux_2_12_x86_64.manylinux2010_x86_64.musllinux_1_1_x86_64',

to the publishing script should work.

I tested this out locally by downloading ziglang-0.10.0-py3-none-manylinux_2_12_x86_64.manylinux2010_x86_64.whl and renaming it to ziglang-0.10.0-py3-none-manylinux_2_12_x86_64.manylinux2010_x86_64.musllinux_1_1_x86_64.whl and then running python3 -m ziglang worked fine.

Publishing this wheel means running pip install maturin[zig] on Alpine linux will work as well.