Update python-app.yml

This commit is contained in:
Anthony Samms
2025-10-27 19:16:51 -04:00
parent bba19f449f
commit 258f5402c5

View File

@@ -226,33 +226,26 @@ jobs:
- name: Build Pillow from source (Windows) - name: Build Pillow from source (Windows)
if: runner.os == 'Windows' if: runner.os == 'Windows'
shell: cmd shell: msys2 {0}
run: | run: |
echo === Building Pillow from source === echo "=== Building Pillow from source ==="
REM Add MSYS2 to PATH so Pillow can find the libraries # Get the Windows Python path from uv
set PATH=C:\msys64\mingw64\bin;C:\msys64\usr\bin;%PATH% PYTHON_PATH=$(cygpath -u "$(/c/hostedtoolcache/windows/uv/*/x64/uv.exe python dir)")
PYTHON_EXE="$PYTHON_PATH/python.exe"
REM Set up build environment for Pillow echo "Python executable: $PYTHON_EXE"
set CFLAGS=-IC:\msys64\mingw64\include
set LDFLAGS=-LC:\msys64\mingw64\lib
set PKG_CONFIG_PATH=C:\msys64\mingw64\lib\pkgconfig
set INCLUDE=C:\msys64\mingw64\include;%INCLUDE%
set LIB=C:\msys64\mingw64\lib;%LIB%
REM Explicitly set library paths for Pillow's setup.py # Set up build environment with MSYS2 paths
set ZLIB_ROOT=C:\msys64\mingw64 export PKG_CONFIG_PATH="/mingw64/lib/pkgconfig"
set JPEG_ROOT=C:\msys64\mingw64 export CFLAGS="-I/mingw64/include"
set TIFF_ROOT=C:\msys64\mingw64 export LDFLAGS="-L/mingw64/lib"
set FREETYPE_ROOT=C:\msys64\mingw64
set LCMS_ROOT=C:\msys64\mingw64
set WEBP_ROOT=C:\msys64\mingw64
REM Install Pillow from source into system Python # Build Pillow using MSYS2's Python pip with the Windows Python
uv pip install --system --no-binary pillow pillow "$PYTHON_EXE" -m pip install --no-binary pillow pillow
echo === Pillow build completed === echo "=== Pillow build completed ==="
uv pip show --system pillow "$PYTHON_EXE" -m pip show pillow
- name: Install Dependencies - name: Install Dependencies
run: | run: |