Files
haikuports/dev-python/babel/babel-2.10.3.recipe
Jérôme Duval df145a169a Drop python 3.7 (and 2.7) for recipes under dev-python/
Recipes with only 3.7 are left alone. Help with #8025.
2023-03-23 21:18:44 +01:00

68 lines
1.8 KiB
Bash

SUMMARY="A collection of tools for internationalizing Python applications"
DESCRIPTION="Babel is a Python library that provides an integrated \
collection of utilities that assist with internationalizing and localizing \
Python applications (in particular web-based applications.)"
HOMEPAGE="http://babel.pocoo.org/"
COPYRIGHT="2013-2022 by the Babel Team"
LICENSE="BSD (3-clause)"
REVISION="3"
SOURCE_URI="https://github.com/python-babel/babel/archive/v$portVersion.tar.gz"
CHECKSUM_SHA256="960d7a36861836081929735afe5a98aa2fb0d3720e3abc44e2d0950092e0a573"
SOURCE_FILENAME="babel-v$portVersion.tar.gz"
ARCHITECTURES="any"
PROVIDES="
$portName = $portVersion
"
REQUIRES="
haiku
"
BUILD_REQUIRES="
haiku_devel
"
PYTHON_PACKAGES=(python38 python39 python310)
PYTHON_VERSIONS=(3.8 3.9 3.10)
for i in "${!PYTHON_PACKAGES[@]}"; do
pythonPackage=${PYTHON_PACKAGES[i]}
pythonVersion=${PYTHON_VERSIONS[$i]}
eval "PROVIDES_${pythonPackage}=\"\
${portName}_$pythonPackage = $portVersion\n\
cmd:pybabel${pythonVersion} \
\"; \
REQUIRES_$pythonPackage=\"\
haiku\n\
cmd:python$pythonVersion\n\
pytz_$pythonPackage\n\
setuptools_$pythonPackage\
\""
BUILD_REQUIRES="$BUILD_REQUIRES
setuptools_$pythonPackage"
BUILD_PREREQUIRES="$BUILD_PREREQUIRES
cmd:python$pythonVersion"
done
INSTALL()
{
for i in "${!PYTHON_PACKAGES[@]}"; do
pythonPackage=${PYTHON_PACKAGES[i]}
pythonVersion=${PYTHON_VERSIONS[$i]}
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
mv $prefix/bin/pybabel $prefix/bin/pybabel${pythonVersion}
packageEntries $pythonPackage \
$prefix/lib/python* \
$prefix/bin
done
}