Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add wheel support for musllinux #1266

Merged
merged 1 commit into from
Jan 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 2 additions & 12 deletions .github/workflows/wheels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,18 +30,7 @@ jobs:

- name: Build wheels
run: python -m cibuildwheel --output-dir wheelhouse
env:
CIBW_BEFORE_ALL: sh build.sh
CIBW_ENVIRONMENT: LIBGIT2_VERSION=1.7.1 LIBSSH2_VERSION=1.11.0 OPENSSL_VERSION=3.1.3 LIBGIT2=/project/ci
CIBW_ENVIRONMENT_MACOS: LIBGIT2_VERSION=1.7.1 LIBSSH2_VERSION=1.11.0 OPENSSL_VERSION=3.1.3 LIBGIT2=/Users/runner/work/pygit2/pygit2/ci
CIBW_SKIP: "*musl* pp3*"
CIBW_MANYLINUX_AARCH64_IMAGE: "manylinux2014"
CIBW_MANYLINUX_X86_64_IMAGE: "manylinux2014"
CIBW_REPAIR_WHEEL_COMMAND_LINUX: "LD_LIBRARY_PATH=/project/ci/lib64 auditwheel repair -w {dest_dir} {wheel}"
CIBW_REPAIR_WHEEL_COMMAND_MACOS: "DYLD_LIBRARY_PATH=/Users/runner/work/pygit2/pygit2/ci/lib delocate-wheel --require-archs {delocate_archs} -w {dest_dir} {wheel}"
CIBW_ARCHS_MACOS: universal2
CIBW_ARCHS_LINUX: x86_64 aarch64


- uses: actions/upload-artifact@v3
with:
name: wheels
Expand All @@ -65,3 +54,4 @@ jobs:
with:
user: __token__
password: ${{ secrets.PYPI_API_TOKEN }}

5 changes: 5 additions & 0 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,11 @@ if [ "$CIBUILDWHEEL" = "1" ]; then
else
yum install perl-IPC-Cmd -y
fi
elif [ -f /sbin/apk ]; then
apk add wget
if [ -z "$OPENSSL_VERSION" ]; then
apk add openssl-dev
fi
fi
rm -rf ci
mkdir ci || true
Expand Down
23 changes: 23 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,2 +1,25 @@
[build-system]
requires = ["setuptools", "wheel"]

[tool.cibuildwheel]
skip = "pp3*"

archs = ["auto"]
build-frontend = "default"
dependency-versions = "pinned"
environment = {LIBGIT2_VERSION="1.7.1", LIBSSH2_VERSION="1.11.0", OPENSSL_VERSION="3.1.3", LIBGIT2="/project/ci"}

before-all = "sh build.sh"

[tool.cibuildwheel.linux]
repair-wheel-command = "LD_LIBRARY_PATH=/project/ci/lib64 auditwheel repair -w {dest_dir} {wheel}"
archs = ["x86_64", "aarch64"]

[[tool.cibuildwheel.overrides]]
select = "*-musllinux*"
repair-wheel-command = "LD_LIBRARY_PATH=/project/ci/lib auditwheel repair -w {dest_dir} {wheel}"

[tool.cibuildwheel.macos]
environment = {LIBGIT2_VERSION="1.7.1", LIBSSH2_VERSION="1.11.0", OPENSSL_VERSION="3.1.3", LIBGIT2="/Users/runner/work/pygit2/pygit2/ci"}
repair-wheel-command = "DYLD_LIBRARY_PATH=/Users/runner/work/pygit2/pygit2/ci/lib delocate-wheel --require-archs {delocate_archs} -w {dest_dir} {wheel}"
archs = ["universal2"]