ssh-python icon indicating copy to clipboard operation
ssh-python copied to clipboard

Using cibuildwheel; Building wheels for more achs, manylinux_2_28, musllinux

Open martinhoyer opened this issue 2 years ago • 0 comments

I wanted to learn working with cibuildwheel and to see what it takes to build for non-native architectures. Also perhaps to learn why people are using circleci, so I've been experimenting with building ssh-python wheels.

On my fork, I've abandoned using Containerfiles and the only two files to maintain are .circleci/config.yml and pyproject.toml (although the everything in pyproject.toml could also be specified in config.yml. I liked having it separate for readability)

This is just a proof of concept, so for example I'm using many/musllinux image repos for openssl, libssh, krb5 sources instead locking an upstream/repo versions. This can be done in 'before-all' section. I barely know what I'm doing, but if you like the idea, I can improve it based on your requirements so it can be something worth opening PR for.

The differences are:

  • building macos arm64 wheels (running on xcode: 14.0.0)
  • building all cp versions except cp37 (includes cp311)
  • building on musllinux on x86_64 and aarch64
  • building manylinux ppc64le and s390x wheels
  • building only manylinux_2_28 wheels (cp36 manylinux2014 should probably be added)
  • using build instead of pip

Building on qemu take quite a lot longer, I've tried to speed things up by disabling the test (not much time saved) and skipping musllinux, and it looks like this: Screenshot from 2023-01-23 12-15-00

Artifacts:

cp310-cp310-macosx_10_9_x86_64.whl
cp310-cp310-macosx_11_0_arm64.whl
cp311-cp311-macosx_10_9_x86_64.whl
cp311-cp311-macosx_11_0_arm64.whl
cp36-cp36m-macosx_10_9_x86_64.whl
cp38-cp38-macosx_10_9_x86_64.whl
cp38-cp38-macosx_11_0_arm64.whl
cp39-cp39-macosx_10_9_x86_64.whl
cp39-cp39-macosx_11_0_arm64.whl
    
cp310-cp310-manylinux_2_28_x86_64.whl
cp310-cp310-musllinux_1_1_x86_64.whl
cp311-cp311-manylinux_2_28_x86_64.whl
cp311-cp311-musllinux_1_1_x86_64.whl
cp36-cp36m-manylinux_2_28_x86_64.whl
cp36-cp36m-musllinux_1_1_x86_64.whl
cp38-cp38-manylinux_2_28_x86_64.whl
cp38-cp38-musllinux_1_1_x86_64.whl
cp39-cp39-manylinux_2_28_x86_64.whl
cp39-cp39-musllinux_1_1_x86_64.whl
    
cp310-cp310-manylinux_2_28_aarch64.whl
cp310-cp310-musllinux_1_1_aarch64.whl
cp311-cp311-manylinux_2_28_aarch64.whl
cp311-cp311-musllinux_1_1_aarch64.whl
cp36-cp36m-manylinux_2_28_aarch64.whl
cp36-cp36m-musllinux_1_1_aarch64.whl
cp38-cp38-manylinux_2_28_aarch64.whl
cp38-cp38-musllinux_1_1_aarch64.whl
cp39-cp39-manylinux_2_28_aarch64.whl
cp39-cp39-musllinux_1_1_aarch64.whl
    
cp310-cp310-manylinux_2_28_s390x.whl
cp311-cp311-manylinux_2_28_s390x.whl
cp36-cp36m-manylinux_2_28_s390x.whl
cp38-cp38-manylinux_2_28_s390x.whl
cp39-cp39-manylinux_2_28_s390x.whl
    
cp310-cp310-manylinux_2_28_ppc64le.whl
cp311-cp311-manylinux_2_28_ppc64le.whl
cp36-cp36m-manylinux_2_28_ppc64le.whl
cp38-cp38-manylinux_2_28_ppc64le.whl
cp39-cp39-manylinux_2_28_ppc64le.whl

HTH, though not sure if this exercise is useful to this project in any way, please feel free to close this if not :)

martinhoyer avatar Jan 23 '23 11:01 martinhoyer