mirror of
https://github.com/Yonokid/PyTaiko.git
synced 2026-02-04 03:30:13 +01:00
Update python-app.yml
This commit is contained in:
24
.github/workflows/python-app.yml
vendored
24
.github/workflows/python-app.yml
vendored
@@ -230,18 +230,34 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
echo "=== Building Pillow from source ==="
|
echo "=== Building Pillow from source ==="
|
||||||
|
|
||||||
# Get the Windows Python path from uv
|
# Find uv in Windows PATH
|
||||||
PYTHON_PATH=$(cygpath -u "$(/c/hostedtoolcache/windows/uv/*/x64/uv.exe python dir)")
|
UV_PATH=$(where.exe uv.exe | head -n1)
|
||||||
PYTHON_EXE="$PYTHON_PATH/python.exe"
|
echo "UV found at: $UV_PATH"
|
||||||
|
|
||||||
|
# Get the Python directory from uv
|
||||||
|
PYTHON_DIR=$("$UV_PATH" python dir 2>/dev/null || echo "")
|
||||||
|
|
||||||
|
if [ -z "$PYTHON_DIR" ]; then
|
||||||
|
echo "Trying alternative method to find Python..."
|
||||||
|
# Alternative: check common uv Python locations
|
||||||
|
PYTHON_DIR=$(find /c/Users/*/AppData/Roaming/uv/python -name "cpython-*-windows-*" -type d 2>/dev/null | head -n1)
|
||||||
|
fi
|
||||||
|
|
||||||
|
PYTHON_EXE="$PYTHON_DIR/python.exe"
|
||||||
|
echo "Python directory: $PYTHON_DIR"
|
||||||
echo "Python executable: $PYTHON_EXE"
|
echo "Python executable: $PYTHON_EXE"
|
||||||
|
|
||||||
|
if [ ! -f "$PYTHON_EXE" ]; then
|
||||||
|
echo "Error: Python executable not found at $PYTHON_EXE"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
# Set up build environment with MSYS2 paths
|
# Set up build environment with MSYS2 paths
|
||||||
export PKG_CONFIG_PATH="/mingw64/lib/pkgconfig"
|
export PKG_CONFIG_PATH="/mingw64/lib/pkgconfig"
|
||||||
export CFLAGS="-I/mingw64/include"
|
export CFLAGS="-I/mingw64/include"
|
||||||
export LDFLAGS="-L/mingw64/lib"
|
export LDFLAGS="-L/mingw64/lib"
|
||||||
|
|
||||||
# Build Pillow using MSYS2's Python pip with the Windows Python
|
# Build Pillow using the Windows Python
|
||||||
"$PYTHON_EXE" -m pip install --no-binary pillow pillow
|
"$PYTHON_EXE" -m pip install --no-binary pillow pillow
|
||||||
|
|
||||||
echo "=== Pillow build completed ==="
|
echo "=== Pillow build completed ==="
|
||||||
|
|||||||
Reference in New Issue
Block a user