Files
haikuports/dev-python/pylzma/pylzma-0.5.0.recipe
Oscar Lesta a7a34b0e29 pylzma: drop Python 3.9 support.
Nothing on-tree seems to require/use this one. Given that it doesn't
requires patching, we should consider dropping the recipe, and let
users "pip install" it if they need it.
2025-09-19 22:53:14 -03:00

77 lines
1.7 KiB
Bash

SUMMARY="Python bindings for the LZMA library by Igor Pavlov"
DESCRIPTION="Contains numerous packages that will allow Python to unpack \
archives."
HOMEPAGE="https://www.joachim-bauch.de/projects/pylzma/"
COPYRIGHT="2004-2015 Joachim Bauch
7-zip 1999-2010 Igor Pavlov
LZMA SDK 1999-2010 Igor Pavlov"
LICENSE="MIT"
REVISION="3"
SOURCE_URI="https://pypi.io/packages/source/p/pylzma/pylzma-$portVersion.tar.gz"
CHECKSUM_SHA256="b874172afbf37770e643bf2dc9d9b6b03eb95d8f8162e157145b3fe9e1b68a1c"
ARCHITECTURES="all !x86_gcc2"
SECONDARY_ARCHITECTURES="x86"
PROVIDES="
$portName = $portVersion
"
REQUIRES="
haiku$secondaryArchSuffix
"
BUILD_REQUIRES="
haiku${secondaryArchSuffix}_devel
"
BUILD_PREREQUIRES="
gcc$secondaryArchSuffix
"
PYTHON_VERSIONS=(3.10)
for pythonVersion in ${PYTHON_VERSIONS[@]}; do
pythonPackage=python${pythonVersion//.}
eval "PROVIDES_$pythonPackage=\"
${portName}_$pythonPackage = $portVersion
\""
if [ "$targetArchitecture" = x86_gcc2 ]; then
eval "PROVIDES_$pythonPackage+=\"
pylzma_$pythonPackage = $portVersion
\""
fi
eval "REQUIRES_$pythonPackage=\"
haiku$secondaryArchSuffix
cmd:python$pythonVersion
\""
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
}