Skip to content

Commit

Permalink
Move cibuildwheel config to pyproject.toml
Browse files Browse the repository at this point in the history
  • Loading branch information
jimisola committed Jan 10, 2024
1 parent 4a99e54 commit 4b67f81
Show file tree
Hide file tree
Showing 2 changed files with 47 additions and 13 deletions.
27 changes: 14 additions & 13 deletions .github/workflows/wheels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,19 +31,19 @@ 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: "pp3* *manylinux* cp36* cp37* cp38* cp39* cp310* cp311*"
CIBW_BUILD: "cp312-musllinux_x86_64"
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_LINUX: "LD_LIBRARY_PATH=/project/ci/lib 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
# 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: "pp3* *manylinux* cp36* cp37* cp38* cp39* cp310* cp311*"
# CIBW_BUILD: "cp312-musllinux_x86_64"
# 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_LINUX: "LD_LIBRARY_PATH=/project/ci/lib 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:
Expand All @@ -68,3 +68,4 @@ jobs:
with:
user: __token__
password: ${{ secrets.PYPI_API_TOKEN }}

33 changes: 33 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,2 +1,35 @@
[build-system]
requires = ["setuptools", "wheel"]

[tool.cibuildwheel]
build = "cp312-musllinux_x86_64"
skip = "pp3* *manylinux* cp36* cp37* cp38* cp39* cp310* cp311*"
test-skip = ""

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

before-all = "sh build.sh"
before-build = ""
repair-wheel-command = ""

manylinux-x86_64-image = "manylinux2014" # set per default
manylinux-aarch64-image = "manylinux2014" # set per default

[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"]

0 comments on commit 4b67f81

Please sign in to comment.