37 lines
1.0 KiB
Plaintext
37 lines
1.0 KiB
Plaintext
# Description: A collection of tools for internationalizing Python applications
|
|
# URL: http://babel.pocoo.org/
|
|
# Maintainer: Tim Biermann, tbier at posteo dot de
|
|
# Depends on: python3-pytz python3-setuptools
|
|
|
|
name=python3-babel
|
|
version=2.8.1
|
|
release=1
|
|
cldrver=36.0 # $SRC/babel-$version/scripts/download_import_cldr.py
|
|
|
|
source=(https://github.com/python-babel/babel/archive/v$version/$name-$version.tar.gz
|
|
https://unicode.org/Public/cldr/${cldrver::2}/cldr-common-$cldrver.zip)
|
|
|
|
unpack_source() {
|
|
for file in ${source[@]}; do
|
|
case ${file##*/} in
|
|
$name-$version.tar.gz)
|
|
bsdtar -p -o -C $SRC -xf $(get_filename $file) ;;
|
|
cldr-common-$cldrver.zip)
|
|
cp $(get_filename $file) $SRC/babel-$version/cldr/cldr-core-${cldrver::2}.zip ;;
|
|
*)
|
|
cp $(get_filename $file) $SRC ;;
|
|
esac
|
|
done
|
|
}
|
|
|
|
build() {
|
|
cd babel-$version
|
|
|
|
/usr/bin/python3 setup.py import_cldr
|
|
/usr/bin/python3 setup.py build
|
|
/usr/bin/python3 setup.py install --root=$PKG \
|
|
--optimize=1 \
|
|
--skip-build
|
|
mv $PKG/usr/bin/pybabel $PKG/usr/bin/py3babel
|
|
}
|