Skip to content

Commit

Permalink
cibw wip
Browse files Browse the repository at this point in the history
  • Loading branch information
fdintino committed Oct 11, 2024
1 parent edb3ad3 commit f0c710c
Show file tree
Hide file tree
Showing 10 changed files with 449 additions and 316 deletions.
1 change: 1 addition & 0 deletions .ci/requirements-cibw.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
cibuildwheel==2.21.2
24 changes: 24 additions & 0 deletions .github/workflows/wheels-dependencies.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
#!/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
export PLAT=$CIBW_ARCHS
source multibuild/common_utils.sh
source multibuild/library_builders.sh
if [ -z "$IS_MACOS" ]; then
source multibuild/manylinux_utils.sh
fi

source wheelbuild/config.sh

function build {
if [[ -n "$IS_MACOS" ]] && [[ "$CIBW_ARCHS" == "arm64" ]]; then
sudo chown -R runner /usr/local
fi
pre_build
}

wrap_wheel_builder build
18 changes: 18 additions & 0 deletions .github/workflows/wheels-test.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
param ([string]$venv, [string]$pillow_avif_plugin="C:\pillow_avif_plugin")
$ErrorActionPreference = 'Stop'
$ProgressPreference = 'SilentlyContinue'
Set-PSDebug -Trace 1
if ("$venv" -like "*\cibw-run-*\pp*-win_amd64\*") {
# unlike CPython, PyPy requires Visual C++ Redistributable to be installed
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12
Invoke-WebRequest -Uri 'https://aka.ms/vs/15/release/vc_redist.x64.exe' -OutFile 'vc_redist.x64.exe'
C:\vc_redist.x64.exe /install /quiet /norestart | Out-Null
}
$env:path += ";$pillow_avif_plugin\winbuild\build\bin\"
& "$venv\Scripts\activate.ps1"
& reg add "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\python.exe" /v "GlobalFlag" /t REG_SZ /d "0x02000000" /f
cd $pillow_avif_plugin
& python -VV
if (!$?) { exit $LASTEXITCODE }
& python -m pytest -vx tests
if (!$?) { exit $LASTEXITCODE }
4 changes: 4 additions & 0 deletions .github/workflows/wheels-test.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/bin/bash
set -e

python3 -m pytest
Loading

0 comments on commit f0c710c

Please sign in to comment.