mirror of
https://github.com/yann64/haikuports.git
synced 2026-04-16 08:40:06 +02:00
Babel: add recipe (#5743)
This commit is contained in:
67
dev-python/babel/babel-2.9.0.recipe
Normal file
67
dev-python/babel/babel-2.9.0.recipe
Normal file
@@ -0,0 +1,67 @@
|
||||
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-2020 the Babel Team"
|
||||
LICENSE="BSD (3-clause)"
|
||||
REVISION="1"
|
||||
SOURCE_URI="https://github.com/python-babel/babel/archive/v$portVersion.tar.gz"
|
||||
CHECKSUM_SHA256="7df55ebc7a75b6c544c381e1cc07151c2429f73f4ed01107bd8998b96cc83f42"
|
||||
SOURCE_DIR="babel-$portVersion"
|
||||
|
||||
ARCHITECTURES="any"
|
||||
|
||||
PROVIDES="
|
||||
$portName = $portVersion
|
||||
"
|
||||
REQUIRES="
|
||||
haiku
|
||||
"
|
||||
|
||||
BUILD_REQUIRES="
|
||||
haiku_devel
|
||||
"
|
||||
|
||||
PYTHON_PACKAGES=(python3 python38 python39)
|
||||
PYTHON_VERSIONS=(3.7 3.8 3.9)
|
||||
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
|
||||
}
|
||||
Reference in New Issue
Block a user