blob: 0b1360cea6e3b1b0873774c702c29fdf1262fa03 (
plain)
1 # Description: A collection of tools for internationalizing Python applications
2 # URL: http://babel.pocoo.org/
3 # Maintainer: Tim Biermann, tbier at posteo dot de
4 # Depends on: python3-pytz python3-setuptools
5
6 name=python3-babel
7 version=2.9.0
8 release=1
9 cldrver=37.0 # $SRC/babel-$version/scripts/download_import_cldr.py
10
11 source=(https://pypi.io/packages/source/B/Babel/Babel-${version}.tar.gz
12 https://unicode.org/Public/cldr/${cldrver::2}/cldr-common-$cldrver.zip)
13
14 unpack_source() {
15 for file in ${source[@]}; do
16 case ${file##*/} in
17 Babel-$version.tar.gz)
18 bsdtar -p -o -C $SRC -xf $(get_filename $file) ;;
19 cldr-common-$cldrver.zip)
20 mkdir $SRC/Babel-$version/cldr
21 cp $(get_filename $file) $SRC/Babel-$version/cldr/cldr-core-${cldrver::2}.zip ;;
22 *)
23 cp $(get_filename $file) $SRC ;;
24 esac
25 done
26 }
27
28 build() {
29 cd Babel-$version
30
31 /usr/bin/python3 setup.py import_cldr
32 /usr/bin/python3 setup.py build
33 /usr/bin/python3 setup.py install --root=$PKG \
34 --optimize=1 \
35 --skip-build
36 mv $PKG/usr/bin/pybabel $PKG/usr/bin/py3babel
37 }
|