mirror of
https://github.com/yann64/haikuports.git
synced 2026-04-23 04:00:05 +02:00
dev-python/pbr: bump to 5.1.1.
This commit is contained in:
94
dev-python/pbr/pbr-5.1.1.recipe
Normal file
94
dev-python/pbr/pbr-5.1.1.recipe
Normal file
@@ -0,0 +1,94 @@
|
||||
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="1"
|
||||
SOURCE_URI="https://files.pythonhosted.org/packages/source/p/pbr/pbr-$portVersion.tar.gz"
|
||||
CHECKSUM_SHA256="f59d71442f9ece3dffc17bc36575768e1ee9967756e6b6535f0ee1f0054c3d68"
|
||||
|
||||
ARCHITECTURES="any"
|
||||
|
||||
PROVIDES="
|
||||
$portName = $portVersion
|
||||
"
|
||||
REQUIRES="
|
||||
haiku
|
||||
"
|
||||
|
||||
BUILD_REQUIRES="
|
||||
haiku_devel
|
||||
setuptools_python
|
||||
setuptools_python3
|
||||
"
|
||||
BUILD_PREREQUIRES="
|
||||
cmd:python
|
||||
cmd:python3
|
||||
"
|
||||
|
||||
PYTHON_PACKAGES=(python python3)
|
||||
PYTHON_VERSIONS=(2.7 3.6)
|
||||
for i in "${!PYTHON_PACKAGES[@]}"; do
|
||||
pythonPackage=${PYTHON_PACKAGES[i]}
|
||||
pythonVersion=${PYTHON_VERSIONS[$i]}
|
||||
eval "PROVIDES_$pythonPackage=\"
|
||||
${portName}_$pythonPackage = $portVersion
|
||||
\""
|
||||
eval "REQUIRES_$pythonPackage=\"
|
||||
haiku
|
||||
cmd:python$pythonVersion
|
||||
\""
|
||||
done
|
||||
PROVIDES_python+="
|
||||
cmd:pbr2
|
||||
"
|
||||
PROVIDES_python3+="
|
||||
cmd:pbr
|
||||
"
|
||||
|
||||
BUILD()
|
||||
{
|
||||
for i in "${!PYTHON_PACKAGES[@]}"; do
|
||||
pythonPackage=${PYTHON_PACKAGES[i]}
|
||||
pythonVersion=${PYTHON_VERSIONS[$i]}
|
||||
|
||||
rm -rf "$sourceDir"-$pythonPackage
|
||||
cp -a "$sourceDir" "$sourceDir"-$pythonPackage
|
||||
cd "$sourceDir"-$pythonPackage
|
||||
|
||||
python=python$pythonVersion
|
||||
$python setup.py build
|
||||
done
|
||||
}
|
||||
|
||||
INSTALL()
|
||||
{
|
||||
for i in "${!PYTHON_PACKAGES[@]}"; do
|
||||
pythonPackage=${PYTHON_PACKAGES[i]}
|
||||
pythonVersion=${PYTHON_VERSIONS[$i]}
|
||||
|
||||
cd "$sourceDir"-$pythonPackage
|
||||
|
||||
python=python$pythonVersion
|
||||
installLocation=$prefix/lib/$python/vendor-packages/
|
||||
export PYTHONPATH=$installLocation
|
||||
mkdir -p "$installLocation"
|
||||
$python setup.py install \
|
||||
--root=/ --prefix="$prefix"
|
||||
|
||||
if [ "$pythonPackage" = python ]; then
|
||||
mv "$binDir"/pbr "$binDir"/pbr2
|
||||
fi
|
||||
|
||||
packageEntries $pythonPackage \
|
||||
"$binDir" \
|
||||
"$prefix"/lib/$python
|
||||
done
|
||||
}
|
||||
Reference in New Issue
Block a user