mirror of
https://github.com/python-pillow/Pillow.git
synced 2024-12-27 18:36:17 +03:00
Merge pull request #271 from radarhere/musllinux
This commit is contained in:
commit
d579370ccb
2
.github/workflows/build.sh
vendored
2
.github/workflows/build.sh
vendored
|
@ -19,6 +19,8 @@ if [[ "$MB_PYTHON_VERSION" == pypy3* ]]; then
|
||||||
else
|
else
|
||||||
DOCKER_TEST_IMAGE="multibuild/focal_$PLAT"
|
DOCKER_TEST_IMAGE="multibuild/focal_$PLAT"
|
||||||
fi
|
fi
|
||||||
|
elif [[ "$MB_ML_LIBC" == "manylinux" ]] && [[ "$PLAT" == "x86_64" ]]; then
|
||||||
|
DOCKER_TEST_IMAGE="matthewbrett/trusty:64"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo "::group::Install a virtualenv"
|
echo "::group::Install a virtualenv"
|
||||||
|
|
58
.github/workflows/wheels-linux.yml
vendored
Normal file
58
.github/workflows/wheels-linux.yml
vendored
Normal file
|
@ -0,0 +1,58 @@
|
||||||
|
name: Build Linux wheels
|
||||||
|
|
||||||
|
on:
|
||||||
|
workflow_call:
|
||||||
|
inputs:
|
||||||
|
build-commit:
|
||||||
|
required: true
|
||||||
|
type: string
|
||||||
|
artifacts-name:
|
||||||
|
required: true
|
||||||
|
type: string
|
||||||
|
|
||||||
|
env:
|
||||||
|
REPO_DIR: Pillow
|
||||||
|
TEST_DEPENDS: "pytest pytest-timeout"
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
name: ${{ matrix.python }} ${{ matrix.mb-ml-libc }} ${{ matrix.platform }}
|
||||||
|
runs-on: "ubuntu-20.04"
|
||||||
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
|
matrix:
|
||||||
|
python: [ "pypy3.7-7.3.8", "pypy3.8-7.3.8", "3.7", "3.8", "3.9", "3.10" ]
|
||||||
|
platform: [ "i686", "x86_64" ]
|
||||||
|
mb-ml-libc: [ "manylinux" ]
|
||||||
|
include:
|
||||||
|
- python: "3.8"
|
||||||
|
platform: "x86_64"
|
||||||
|
mb-ml-libc: "musllinux"
|
||||||
|
- python: "3.9"
|
||||||
|
platform: "x86_64"
|
||||||
|
mb-ml-libc: "musllinux"
|
||||||
|
- python: "3.10"
|
||||||
|
platform: "x86_64"
|
||||||
|
mb-ml-libc: "musllinux"
|
||||||
|
env:
|
||||||
|
BUILD_COMMIT: ${{ inputs.build-commit }}
|
||||||
|
PLAT: ${{ matrix.platform }}
|
||||||
|
MB_PYTHON_VERSION: ${{ matrix.python }}
|
||||||
|
MB_ML_LIBC: ${{ matrix.mb-ml-libc }}
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v3
|
||||||
|
with:
|
||||||
|
submodules: true
|
||||||
|
- uses: actions/setup-python@v3
|
||||||
|
with:
|
||||||
|
python-version: "3.10"
|
||||||
|
- name: Build Wheel
|
||||||
|
run: .github/workflows/build.sh
|
||||||
|
- uses: actions/upload-artifact@v3
|
||||||
|
with:
|
||||||
|
name: ${{ inputs.artifacts-name }}
|
||||||
|
path: wheelhouse/*.whl
|
||||||
|
# Uncomment to get SSH access for testing
|
||||||
|
# - name: Setup tmate session
|
||||||
|
# if: failure()
|
||||||
|
# uses: mxschmitt/action-tmate@v3
|
|
@ -1,4 +1,4 @@
|
||||||
name: Build wheels
|
name: Build macOS wheels
|
||||||
|
|
||||||
on:
|
on:
|
||||||
workflow_call:
|
workflow_call:
|
||||||
|
@ -12,44 +12,29 @@ on:
|
||||||
|
|
||||||
env:
|
env:
|
||||||
REPO_DIR: Pillow
|
REPO_DIR: Pillow
|
||||||
BUILD_DEPENDS: ""
|
|
||||||
TEST_DEPENDS: "pytest pytest-timeout"
|
TEST_DEPENDS: "pytest pytest-timeout"
|
||||||
WHEEL_SDIR: wheelhouse
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
name: ${{ matrix.os-name }} ${{ matrix.python }} ${{ matrix.platform }}
|
name: ${{ matrix.python }} ${{ matrix.platform }}
|
||||||
runs-on: ${{ matrix.os }}
|
runs-on: "macos-latest"
|
||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
os: [ "macos-latest", "ubuntu-20.04" ]
|
|
||||||
python: [ "pypy3.7-7.3.8", "pypy3.8-7.3.8", "3.7", "3.8", "3.9", "3.10" ]
|
python: [ "pypy3.7-7.3.8", "pypy3.8-7.3.8", "3.7", "3.8", "3.9", "3.10" ]
|
||||||
platform: [ "arm64", "x86_64", "i686" ]
|
platform: [ "x86_64", "arm64" ]
|
||||||
exclude:
|
exclude:
|
||||||
- os: "macos-latest"
|
- python: "3.7"
|
||||||
platform: "i686"
|
|
||||||
- os: "macos-latest"
|
|
||||||
platform: "arm64"
|
platform: "arm64"
|
||||||
python: "3.7"
|
- python: "pypy3.7-7.3.8"
|
||||||
- os: "macos-latest"
|
|
||||||
platform: "arm64"
|
platform: "arm64"
|
||||||
python: "pypy3.7-7.3.8"
|
- python: "pypy3.8-7.3.8"
|
||||||
- os: "macos-latest"
|
|
||||||
platform: "arm64"
|
platform: "arm64"
|
||||||
python: "pypy3.8-7.3.8"
|
|
||||||
- os: "ubuntu-20.04"
|
|
||||||
platform: "arm64"
|
|
||||||
include:
|
|
||||||
- os: "macos-latest"
|
|
||||||
os-name: "osx"
|
|
||||||
- os: "ubuntu-20.04"
|
|
||||||
os-name: "focal"
|
|
||||||
env:
|
env:
|
||||||
BUILD_COMMIT: ${{ inputs.build-commit }}
|
BUILD_COMMIT: ${{ inputs.build-commit }}
|
||||||
PLAT: ${{ matrix.platform }}
|
PLAT: ${{ matrix.platform }}
|
||||||
MB_PYTHON_VERSION: ${{ matrix.python }}
|
MB_PYTHON_VERSION: ${{ matrix.python }}
|
||||||
TRAVIS_OS_NAME: ${{ matrix.os-name }}
|
TRAVIS_OS_NAME: "osx"
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v3
|
||||||
with:
|
with:
|
27
.github/workflows/wheels.yml
vendored
27
.github/workflows/wheels.yml
vendored
|
@ -3,24 +3,37 @@ name: Wheels
|
||||||
on: [push, pull_request, workflow_dispatch]
|
on: [push, pull_request, workflow_dispatch]
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
macos:
|
||||||
uses: ./.github/workflows/wheels-build.yml
|
uses: ./.github/workflows/wheels-macos.yml
|
||||||
with:
|
with:
|
||||||
build-commit: "HEAD"
|
build-commit: "HEAD"
|
||||||
artifacts-name: "wheels"
|
artifacts-name: "wheels"
|
||||||
|
|
||||||
build-latest:
|
linux:
|
||||||
|
uses: ./.github/workflows/wheels-linux.yml
|
||||||
|
with:
|
||||||
|
build-commit: "HEAD"
|
||||||
|
artifacts-name: "wheels"
|
||||||
|
|
||||||
|
macos-latest:
|
||||||
if: "!startsWith(github.ref, 'refs/tags/')"
|
if: "!startsWith(github.ref, 'refs/tags/')"
|
||||||
uses: ./.github/workflows/wheels-build.yml
|
uses: ./.github/workflows/wheels-macos.yml
|
||||||
|
with:
|
||||||
|
build-commit: "main"
|
||||||
|
artifacts-name: "wheels-latest"
|
||||||
|
|
||||||
|
linux-latest:
|
||||||
|
if: "!startsWith(github.ref, 'refs/tags/')"
|
||||||
|
uses: ./.github/workflows/wheels-linux.yml
|
||||||
with:
|
with:
|
||||||
build-commit: "main"
|
build-commit: "main"
|
||||||
artifacts-name: "wheels-latest"
|
artifacts-name: "wheels-latest"
|
||||||
|
|
||||||
release:
|
release:
|
||||||
name: Create Release
|
name: Create Release
|
||||||
runs-on: ubuntu-latest
|
runs-on: linux-latest
|
||||||
if: "startsWith(github.ref, 'refs/tags/')"
|
if: "startsWith(github.ref, 'refs/tags/')"
|
||||||
needs: build
|
needs: [macos, linux]
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/download-artifact@v3
|
- uses: actions/download-artifact@v3
|
||||||
with:
|
with:
|
||||||
|
@ -32,7 +45,7 @@ jobs:
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
|
||||||
success:
|
success:
|
||||||
needs: [build, build-latest]
|
needs: [macos, linux, macos-latest, linux-latest]
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
name: Wheels Successful
|
name: Wheels Successful
|
||||||
steps:
|
steps:
|
||||||
|
|
2
.gitmodules
vendored
2
.gitmodules
vendored
|
@ -3,4 +3,4 @@
|
||||||
url = https://github.com/python-Pillow/Pillow.git
|
url = https://github.com/python-Pillow/Pillow.git
|
||||||
[submodule "multibuild"]
|
[submodule "multibuild"]
|
||||||
path = multibuild
|
path = multibuild
|
||||||
url = https://github.com/multi-build/multibuild.git
|
url = https://github.com/radarhere/multibuild.git
|
||||||
|
|
|
@ -51,7 +51,7 @@ function pre_build {
|
||||||
untar pillow-depends-main.zip
|
untar pillow-depends-main.zip
|
||||||
|
|
||||||
build_xz
|
build_xz
|
||||||
if [ -z "$IS_MACOS" ]; then
|
if [ -z "$IS_ALPINE" ] && [ -z "$IS_MACOS" ]; then
|
||||||
yum remove -y zlib-devel
|
yum remove -y zlib-devel
|
||||||
fi
|
fi
|
||||||
build_new_zlib
|
build_new_zlib
|
||||||
|
@ -140,7 +140,7 @@ function run_tests_in_repo {
|
||||||
EXP_CODECS="jpg jpg_2000"
|
EXP_CODECS="jpg jpg_2000"
|
||||||
EXP_CODECS="$EXP_CODECS libtiff zlib"
|
EXP_CODECS="$EXP_CODECS libtiff zlib"
|
||||||
EXP_MODULES="freetype2 littlecms2 pil tkinter webp"
|
EXP_MODULES="freetype2 littlecms2 pil tkinter webp"
|
||||||
if [ -z "$IS_MACOS" ] && [[ "$MB_PYTHON_VERSION" != pypy3* ]] && [[ "$MACHTYPE" != aarch64* ]]; then
|
if [ -z "$IS_MACOS" ] && [ -z "$IS_ALPINE" ] && [[ "$MB_PYTHON_VERSION" != pypy3* ]] && [[ "$MACHTYPE" != aarch64* ]]; then
|
||||||
EXP_FEATURES="fribidi harfbuzz libjpeg_turbo raqm transp_webp webp_anim webp_mux xcb"
|
EXP_FEATURES="fribidi harfbuzz libjpeg_turbo raqm transp_webp webp_anim webp_mux xcb"
|
||||||
else
|
else
|
||||||
# can't find FriBiDi
|
# can't find FriBiDi
|
||||||
|
@ -156,7 +156,7 @@ function run_tests {
|
||||||
python3 -m pip install numpy==1.21.4
|
python3 -m pip install numpy==1.21.4
|
||||||
elif [[ "$MB_PYTHON_VERSION" == 3.8 || "$MB_PYTHON_VERSION" == 3.9 ]] && [[ $(uname -m) == "i686" ]]; then
|
elif [[ "$MB_PYTHON_VERSION" == 3.8 || "$MB_PYTHON_VERSION" == 3.9 ]] && [[ $(uname -m) == "i686" ]]; then
|
||||||
python3 -m pip install numpy==1.21.5
|
python3 -m pip install numpy==1.21.5
|
||||||
else
|
elif [ -z "$IS_ALPINE" ]; then
|
||||||
python3 -m pip install numpy
|
python3 -m pip install numpy
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
Subproject commit d0b05e7e7d3525690a077ea7b5536769f7e4ac23
|
Subproject commit 9d90c2a3d184c149e3d2f908d3bd6edcc8771a6f
|
Loading…
Reference in New Issue
Block a user