Files
haikuports/dev-python/pbr/pbr-5.5.1.recipe
OscarL 20decd5523 pbr: cleanups, drop Python 3.9. (#11622)
Only gertty uses this, and that uses Python 3.10 only.
2025-01-09 09:38:23 +01:00

87 lines
2.0 KiB
Bash
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
SUMMARY="Python Build Reasonableness"
DESCRIPTION="PBR is a library that injects some useful and sensible default \
behaviors into your setuptools run.
PBR is only mildly configurable. The basic idea is that theres a decent way \
to run things and if you do, you should reap the rewards, because then its \
simple and repeatable."
HOMEPAGE="https://docs.openstack.org/pbr/latest/
https://pypi.org/project/pbr/
https://github.com/openstack-dev/pbr"
COPYRIGHT="2013-2018 OpenStack Contributors"
LICENSE="Apache v2"
REVISION="3"
SOURCE_URI="https://files.pythonhosted.org/packages/source/p/pbr/pbr-$portVersion.tar.gz"
CHECKSUM_SHA256="5fad80b613c402d5b7df7bd84812548b2a61e9977387a80a5fc5c396492b13c9"
ARCHITECTURES="any"
PROVIDES="
$portName = $portVersion
"
REQUIRES="
haiku
"
BUILD_REQUIRES="
haiku_devel
"
PYTHON_VERSIONS=(3.10)
defaultVersion=3.10
for i in "${!PYTHON_VERSIONS[@]}"; do
pythonVersion=${PYTHON_VERSIONS[$i]}
pythonPackage=python${pythonVersion//.}
eval "PROVIDES_$pythonPackage=\"
${portName}_$pythonPackage = $portVersion
cmd:pbr$pythonVersion = $portVersion
\""
if [ $pythonVersion = $defaultVersion ]; then
eval "PROVIDES_$pythonPackage+=\"
cmd:pbr = $portVersion
\""
fi
eval "REQUIRES_$pythonPackage=\"
haiku
cmd:python$pythonVersion
\""
BUILD_REQUIRES+="
setuptools_$pythonPackage
"
BUILD_PREREQUIRES+="
cmd:python$pythonVersion
"
done
INSTALL()
{
for i in "${!PYTHON_VERSIONS[@]}"; do
pythonVersion=${PYTHON_VERSIONS[$i]}
pythonPackage=python${pythonVersion//.}
python=python$pythonVersion
installLocation=$prefix/lib/$python/vendor-packages/
export PYTHONPATH=$installLocation
mkdir -p "$installLocation"
rm -rf build
$python setup.py build install \
--root=/ --prefix="$prefix"
# Version suffix the script, and provide suffixless version for the default one.
mv $binDir/pbr $binDir/pbr$pythonVersion
if [ $pythonVersion = $defaultVersion ]; then
ln -sr $binDir/pbr$pythonVersion $binDir/pbr
fi
packageEntries $pythonPackage \
$prefix/lib/python* \
$binDir
done
}