mirror of
https://github.com/yann64/haikuports.git
synced 2026-04-09 05:10:05 +02:00
87 lines
2.0 KiB
Bash
87 lines
2.0 KiB
Bash
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 there’s a decent way \
|
||
to run things and if you do, you should reap the rewards, because then it’s \
|
||
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
|
||
}
|