Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master'
Browse files Browse the repository at this point in the history
  • Loading branch information
anibali committed Sep 11, 2023
2 parents 6ca1866 + ac41d48 commit 7ecef14
Show file tree
Hide file tree
Showing 9 changed files with 306 additions and 206 deletions.
105 changes: 65 additions & 40 deletions .github/workflows/build_and_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,80 +49,105 @@ jobs:
pytest tests/
build-wheels:
name: Build ${{ matrix.os }} ${{ matrix.cibw_build }} wheels
name: Build ${{ matrix.cibw_build }} wheels
needs: build-sdist
runs-on: ${{ matrix.os }}
strategy:
matrix:
include:
- os: ubuntu-20.04
cibw_archs_linux: x86_64
cibw_archs: x86_64
cibw_build: "cp3*-manylinux_x86_64"
compile_target: x86_64
- os: ubuntu-20.04
cibw_archs: x86_64
cibw_build: "cp3*-musllinux_x86_64"
cibw_skip: "cp38-musllinux_*"
compile_target: x86_64
- os: ubuntu-20.04
cibw_archs: aarch64
cibw_build: "cp3*-manylinux_aarch64"
compile_target: armv8
# - os: ubuntu-20.04
# cibw_archs_linux: x86_64
# cibw_build: "*-musllinux_*"
# - os: ubuntu-20.04
# cibw_archs_linux: i686
# cibw_build: "*-manylinux_*"
# - os: ubuntu-20.04
# cibw_archs_linux: i686
# cibw_build: "*-musllinux_*"
# cibw_archs: aarch64
# cibw_build: "cp3*-musllinux_aarch64"
# compile_target: armv8
# - os: ubuntu-20.04
# cibw_archs_linux: aarch64
# cibw_build: "*-manylinux_*"
# cibw_archs: i686
# cibw_build: "cp3*-manylinux_i686"
# compile_target: x86
# - os: ubuntu-20.04
# cibw_archs_linux: aarch64
# cibw_build: "*-musllinux_*"
# cibw_archs: i686
# cibw_build: "cp3*-musllinux_i686"
# compile_target: x86
# - os: ubuntu-20.04
# cibw_archs_linux: ppc64le
# cibw_build: "*-manylinux_*"
# cibw_archs: ppc64le
# cibw_build: "cp3*-manylinux_ppc64le"
# compile_target: ppc64le
# - os: ubuntu-20.04
# cibw_archs_linux: ppc64le
# cibw_build: "*-musllinux_*"
# cibw_archs: ppc64le
# cibw_build: "cp3*-musllinux_ppc64le"
# compile_target: ppc64le
# - os: ubuntu-20.04
# cibw_archs_linux: s390x
# cibw_build: "*-manylinux_*"
# cibw_archs: s390x
# cibw_build: "cp3*-manylinux_s390x"
# compile_target: s390x
# - os: ubuntu-20.04
# cibw_archs_linux: s390x
# cibw_build: "*-musllinux_*"
# cibw_archs: s390x
# cibw_build: "cp3*-musllinux_s390x"
# compile_target: s390x
- os: windows-2019
cibw_archs_windows: AMD64
cibw_archs: AMD64
cibw_build: "cp3*-win_amd64"
compile_target: x86_64
# - os: windows-2019
# cibw_archs_windows: x86
# - os: windows-2019
# cibw_archs_windows: ARM64
- os: macos-11
cibw_archs_macos: x86_64
cibw_build: "cp3*-macosx_x86_64"
# cibw_archs: x86
# cibw_build: "cp3*-win32"
# compile_target: x86
- os: windows-2019
cibw_archs: ARM64
cibw_build: "cp3*-win_arm64"
compile_target: armv8
# - os: macos-11
# cibw_archs: x86_64
# cibw_build: "cp3*-macosx_x86_64"
# compile_target: x86_64
# - os: macos-11
# cibw_archs: arm64
# cibw_build: "cp3*-macosx_arm64"
# compile_target: armv8
- os: macos-11
cibw_archs_macos: arm64
cibw_build: "cp3*-macosx_arm64"
cibw_archs: universal2
cibw_build: "cp3*-macosx_universal2"
compile_target: universal2
steps:
- name: Fetch source distribution
uses: actions/download-artifact@v3
with:
name: sdist-${{ github.sha }}
path: dist/
- run: mv dist/webp-*.tar.gz webp.tar.gz
# - name: Set up QEMU
# if: runner.os == 'Linux'
# uses: docker/setup-qemu-action@v2
# with:
# platforms: all
- name: Build wheels
- name: Set up QEMU
if: runner.os == 'Linux' && runner.cibw_archs != 'x86_64'
uses: docker/setup-qemu-action@v2
with:
platforms: all
- name: Build wheels for ${{ matrix.os }} ${{ matrix.cibw_archs }} ${{ matrix.cibw_build }}
uses: pypa/[email protected]
with:
package-dir: webp.tar.gz
output-dir: dist
env:
CIBW_BUILD_FRONTEND: build
CIBW_BUILD: ${{ matrix.cibw_build }}
CIBW_ARCHS_LINUX: ${{ matrix.cibw_archs_linux }}
CIBW_ARCHS_WINDOWS: ${{ matrix.cibw_archs_windows }}
CIBW_ARCHS_MACOS: ${{ matrix.cibw_archs_macos }}
CIBW_SKIP: ${{ matrix.cibw_skip }}
CIBW_ARCHS: ${{ matrix.cibw_archs }}
CIBW_ENVIRONMENT: PYWEBP_COMPILE_TARGET=${{ matrix.compile_target }}
# TODO: Use arm64 CI runner when available
CIBW_TEST_SKIP: "*_arm64"
# 3.12 will be ready when:
# - cffi releases a 3.12 wheel
# - numpy releases a 3.12 wheel
CIBW_PROJECT_REQUIRES_PYTHON: '>=3.8,<3.12'
CIBW_TEST_REQUIRES: pytest
CIBW_TEST_COMMAND: pytest {package}/tests
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,5 @@ core
/dist/
/*.egg-info/
/.eggs/
/conan_output/
*.so
2 changes: 1 addition & 1 deletion MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
include README.md
include LICENSE
include conanfile.txt
include conanfile.py
include pyproject.toml

graft webp_build
Expand Down
10 changes: 10 additions & 0 deletions conanfile.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
from conan import ConanFile
import shutil

class LibwebpRecipe(ConanFile):
def requirements(self):
self.requires('libwebp/1.0.3')

def build_requirements(self):
if not shutil.which('cmake'):
self.tool_requires('cmake/[>=3.5]')
5 changes: 0 additions & 5 deletions conanfile.txt

This file was deleted.

Loading

0 comments on commit 7ecef14

Please sign in to comment.