blob: d45b43a97dd5808aa20fb0455742d4ccfb827970 (
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.8.0
8 release=1
9 cldrver=36.0 # $SRC/babel-$version/scripts/download_import_cldr.py
10
11 source=(https://github.com/python-babel/babel/archive/v$version/$name-$version.tar.gz
12 https://unicode.org/Public/cldr/${cldrver::2}/cldr-common-$cldrver.zip
13 0001-py39.patch 0002-py39.patch)
14
15 unpack_source() {
16 for file in ${source[@]}; do
17 case ${file##*/} in
18 $name-$version.tar.gz)
19 bsdtar -p -o -C $SRC -xf $(get_filename $file) ;;
20 cldr-common-$cldrver.zip)
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 patch -Np1 -i $SRC/0001-py39.patch
32 patch -Np1 -i $SRC/0002-py39.patch
33 python3 setup.py import_cldr
34 python3 setup.py build
35 python3 setup.py install --root=$PKG \
36 --optimize=1 \
37 --skip-build
38 mv $PKG/usr/bin/pybabel $PKG/usr/bin/py3babel
39 }
|