Files
haikuports/dev-python/pbr/pbr-5.1.1.recipe
2018-11-06 15:51:57 +00:00

95 lines
2.1 KiB
Bash
Raw 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="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
}