Skip to content

Commit

Permalink
python-pillow: drop libimagequant for mingw32
Browse files Browse the repository at this point in the history
See #23346
  • Loading branch information
lazka committed Feb 11, 2025
1 parent bde626b commit bc3d348
Showing 1 changed file with 9 additions and 10 deletions.
19 changes: 9 additions & 10 deletions mingw-w64-python-pillow/PKGBUILD
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ _realname=pillow
pkgbase=mingw-w64-python-pillow
pkgname=("${MINGW_PACKAGE_PREFIX}-python-pillow")
pkgver=11.1.0
pkgrel=1
pkgrel=2
provides=("${MINGW_PACKAGE_PREFIX}-python3-${_realname}=${pkgver}"
"${MINGW_PACKAGE_PREFIX}-python3-pillow=${pkgver}")
conflicts=("${MINGW_PACKAGE_PREFIX}-python3-${_realname}"
Expand All @@ -22,7 +22,7 @@ url="https://github.com/python-pillow/Pillow/"
pkgdesc="Python Imaging Library (PIL) fork Python3 version (mingw-w64)"
depends=("${MINGW_PACKAGE_PREFIX}-freetype"
"${MINGW_PACKAGE_PREFIX}-lcms2"
"${MINGW_PACKAGE_PREFIX}-libimagequant"
$([[ "${CARCH}" == "i686" ]] || echo "${MINGW_PACKAGE_PREFIX}-libimagequant")
"${MINGW_PACKAGE_PREFIX}-libjpeg"
"${MINGW_PACKAGE_PREFIX}-libraqm"
"${MINGW_PACKAGE_PREFIX}-libtiff"
Expand All @@ -45,7 +45,13 @@ prepare() {

build() {
cd "${srcdir}/python-build-${MSYSTEM}"
${MINGW_PREFIX}/bin/python -m build --wheel --skip-dependency-check --no-isolation

declare -a _extra_config
if [ "${CARCH}" == "i686" ]; then
_extra_config+=("-Cimagequant=disable")
fi

${MINGW_PREFIX}/bin/python -m build --wheel --skip-dependency-check --no-isolation "${_extra_config[@]}"
}

check() {
Expand All @@ -68,11 +74,4 @@ package() {
install -Dm644 LICENSE "${pkgdir}${MINGW_PREFIX}/share/licenses/python-${_realname}/LICENSE"
install -dm755 "${pkgdir}${MINGW_PREFIX}/include/python${_pybasever}/"
install -m644 -t "${pkgdir}${MINGW_PREFIX}/include/python${_pybasever}/" src/libImaging/*.h

# clean up bins
# cd "${pkgdir}${MINGW_PREFIX}/bin"
# for f in *.py; do
# sed -e "s|${_mingw_prefix}/bin/|/usr/bin/env |g" -i ${f}
# mv "$f" "${f%.py}"
# done
}

0 comments on commit bc3d348

Please sign in to comment.