Skip to content

Commit

Permalink
emptyconfigpath
Browse files Browse the repository at this point in the history
  • Loading branch information
radarhere committed Nov 14, 2023
1 parent 51050bd commit dc43d03
Show file tree
Hide file tree
Showing 4 changed files with 54 additions and 101 deletions.
22 changes: 14 additions & 8 deletions .github/workflows/wheels-dependencies.sh
Original file line number Diff line number Diff line change
@@ -1,10 +1,13 @@
#!/bin/bash
# Define custom utilities
# Test for macOS with [ -n "$IS_MACOS" ]
if [ -z "$IS_MACOS" ]; then
export MB_ML_LIBC=${AUDITWHEEL_POLICY::9}
export MB_ML_VER=${AUDITWHEEL_POLICY:9}
fi
source wheels/multibuild/common_utils.sh
source wheels/multibuild/travis_steps.sh
PLAT=$CIBW_ARCHS source wheels/multibuild/library_builders.sh
if [ -z "$IS_MACOS" ]; then
source wheels/multibuild/library_builders.sh
source wheels/multibuild/manylinux_utils.sh
fi

Expand Down Expand Up @@ -34,9 +37,9 @@ BZIP2_VERSION=1.0.8
LIBXCB_VERSION=1.16
BROTLI_VERSION=1.1.0

if [[ -n "$IS_MACOS" ]] && [[ "$PLAT" == "x86_64" ]]; then
if [[ -n "$IS_MACOS" ]] && [[ "$CIBW_ARCHS" == "x86_64" ]]; then
function build_openjpeg {
local out_dir=$(fetch_unpack https://github.com/uclouvain/openjpeg/archive/v${OPENJPEG_VERSION}.tar.gz)
local out_dir=$(fetch_unpack https://github.com/uclouvain/openjpeg/archive/v${OPENJPEG_VERSION}.tar.gz openjpeg-2.5.0.tar.gz)
(cd $out_dir \
&& cmake -DCMAKE_INSTALL_PREFIX=$BUILD_PREFIX -DCMAKE_INSTALL_NAME_DIR=$BUILD_PREFIX/lib . \
&& make install)
Expand All @@ -46,7 +49,7 @@ fi

function build_brotli {
local cmake=$(get_modern_cmake)
local out_dir=$(fetch_unpack https://github.com/google/brotli/archive/v$BROTLI_VERSION.tar.gz)
local out_dir=$(fetch_unpack https://github.com/google/brotli/archive/v$BROTLI_VERSION.tar.gz brotli-1.1.0.tar.gz)
(cd $out_dir \
&& $cmake -DCMAKE_INSTALL_PREFIX=$BUILD_PREFIX -DCMAKE_INSTALL_NAME_DIR=$BUILD_PREFIX/lib . \
&& make install)
Expand All @@ -61,7 +64,7 @@ function build_brotli {
curl -fsSL -o pillow-depends-main.zip https://github.com/python-pillow/pillow-depends/archive/main.zip
untar pillow-depends-main.zip

if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then
if [[ -n "$IS_MACOS" ]]; then
# webp, zstd, xz, libtiff, libxcb cause a conflict with building webp, libtiff, libxcb
# libxdmcp causes an issue on macOS < 11
# curl from brew requires zstd, use system curl
Expand All @@ -71,7 +74,7 @@ if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then

brew install pkg-config

if [[ "$PLAT" == "arm64" ]]; then
if [[ "$CIBW_ARCHS" == "arm64" ]]; then
export MACOSX_DEPLOYMENT_TARGET="11.0"
else
export MACOSX_DEPLOYMENT_TARGET="10.10"
Expand All @@ -95,7 +98,10 @@ if [ -n "$IS_MACOS" ]; then
build_simple xorgproto 2023.2 https://www.x.org/pub/individual/proto
build_simple libXau 1.0.11 https://www.x.org/pub/individual/lib
build_simple libpthread-stubs 0.5 https://xcb.freedesktop.org/dist
cp venv/share/pkgconfig/xcb-proto.pc venv/lib/pkgconfig/xcb-proto.pc
ls -la /Library/Frameworks/Python.framework/Versions
ls -la /Library/Frameworks/Python.framework/Versions/Current
ls -la /Library/Frameworks/Python.framework/Versions/Current/share/pkgconfig/xcb-proto.pc
cp /Library/Frameworks/Python.framework/Versions/Current/share/pkgconfig/xcb-proto.pc /Library/Frameworks/Python.framework/Versions/Current/lib/pkgconfig
else
sed s/\${pc_sysrootdir\}// /usr/local/share/pkgconfig/xcb-proto.pc > /usr/local/lib/pkgconfig/xcb-proto.pc
fi
Expand Down
44 changes: 0 additions & 44 deletions .github/workflows/wheels-linux.yml

This file was deleted.

44 changes: 0 additions & 44 deletions .github/workflows/wheels-macos.yml

This file was deleted.

45 changes: 40 additions & 5 deletions .github/workflows/wheels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,43 @@ permissions:
contents: read

jobs:
macos:
uses: ./.github/workflows/wheels-macos.yml

linux:
uses: ./.github/workflows/wheels-linux.yml
build:
name: ${{ matrix.name }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
include:
- name: "macOS x86_64"
os: macos-latest
archs: x86_64
- name: "macOS arm64"
os: macos-latest
archs: arm64
- name: "Linux manylinux2014 and musllinux"
os: ubuntu-latest
archs: x86_64
- name: "Linux manylinux_2_28"
os: ubuntu-latest
archs: x86_64
build: "*manylinux*"
manylinux: "manylinux_2_28"
steps:
- uses: actions/checkout@v4
with:
submodules: true
- uses: actions/setup-python@v4
with:
python-version: "3.x"
- name: Build wheels
run: |
python3 -m pip install cibuildwheel
python3 -m cibuildwheel --output-dir wheelhouse
env:
CIBW_ARCHS: ${{ matrix.archs }}
CIBW_BUILD: ${{ matrix.build }}
CIBW_MANYLINUX_X86_64_IMAGE: ${{ matrix.manylinux }}
CIBW_MANYLINUX_PYPY_X86_64_IMAGE: ${{ matrix.manylinux }}
- uses: actions/upload-artifact@v3
with:
path: ./wheelhouse/*.whl

0 comments on commit dc43d03

Please sign in to comment.