Files
haikuports/dev-python/imagesize/imagesize-1.4.1.recipe
Oscar Lesta 2605704317 imagesize: drop Python 3.9 support.
Only user on-tree (sphinx) is already 3.10 only.
2025-09-19 22:53:14 -03:00

67 lines
1.4 KiB
Bash

SUMMARY="Getting image size from png/jpeg/jpeg2000/gif file"
DESCRIPTION="This module analyzes JPEG/JPEG 2000/PNG/GIF/TIFF/SVG \
image headers and returns image size."
HOMEPAGE="https://github.com/shibukawa/imagesize_py"
COPYRIGHT="2016 Yoshiki Shibukawa"
LICENSE="MIT"
REVISION="2"
SOURCE_URI="https://github.com/shibukawa/imagesize_py/archive/$portVersion.tar.gz"
CHECKSUM_SHA256="c353adbba9d9e92fc880ff85279c362a9d4fc580c4783d1949e905200cb8b15b"
SOURCE_DIR="imagesize_py-$portVersion"
ARCHITECTURES="any"
PROVIDES="
$portName = $portVersion
"
REQUIRES="
haiku
"
BUILD_REQUIRES="
haiku_devel
"
PYTHON_VERSIONS=(3.10)
for pythonVersion in ${PYTHON_VERSIONS[@]}; do
pythonPackage=python${pythonVersion//.}
eval "PROVIDES_$pythonPackage=\"
${portName}_$pythonPackage = $portVersion
\""
eval "REQUIRES_$pythonPackage=\"
haiku
cmd:python$pythonVersion
\""
eval "CONFLICTS_$pythonPackage=\"
imagesize_py_$pythonPackage
\""
BUILD_REQUIRES+="
setuptools_$pythonPackage
"
BUILD_PREREQUIRES+="
cmd:python$pythonVersion
"
done
INSTALL()
{
for pythonVersion in ${PYTHON_VERSIONS[@]}; do
pythonPackage=python${pythonVersion//.}
python=python$pythonVersion
installLocation=$prefix/lib/$python/vendor-packages/
export PYTHONPATH=$installLocation:$PYTHONPATH
mkdir -p $installLocation
rm -rf build
$python setup.py build install \
--root=/ --prefix=$prefix
packageEntries $pythonPackage \
$prefix/lib/python*
done
}