Commit 98019c62 authored by Leo's avatar Leo Committed by Natanael Copa

main/py3-unidecode: upgrade to 1.1.1

parent 5a709f54
# Contributor: Fabian Affolter <fabian@affolter-engineering.ch>
# Maintainer: Fabian Affolter <fabian@affolter-engineering.ch>
pkgname=py-unidecode
pkgname=py3-unidecode
_pkgname=Unidecode
pkgver=1.0.23
pkgrel=1
pkgdesc="A Python ASCII transliterations of Unicode text"
pkgver=1.1.1
pkgrel=0
pkgdesc="Python3 ASCII transliterations of Unicode text"
url="https://pypi.python.org/pypi/Unidecode"
arch="noarch"
license="GPL-2.0-or-later"
depends="py3-${pkgname#py-}"
makedepends="python2-dev python3-dev py-setuptools"
subpackages="py2-${pkgname#py-}:_py2 py3-${pkgname#py-}:_py3"
depends="python3 py3-setuptools"
source="https://files.pythonhosted.org/packages/source/${_pkgname:0:1}/$_pkgname/$_pkgname-$pkgver.tar.gz"
builddir="$srcdir/$_pkgname-$pkgver"
build() {
cd "$builddir"
python2 setup.py build
python3 setup.py build
}
package() {
mkdir -p "$pkgdir"
mkdir -p "$pkgdir"/usr/bin
ln -s unidecode-3 "$pkgdir"/usr/bin/unidecode
}
_py2() {
replaces="$pkgname"
_py python2
}
_py3() {
_py python3
check() {
cd "$builddir"
python3 setup.py test
}
_py() {
local python="$1"
local pyver="${1:6:1}"
pkgdesc="$pkgdesc (for $python)"
depends="$depends $python"
install_if="$pkgname=$pkgver-r$pkgrel $python"
package() {
cd "$builddir"
$python setup.py install --prefix=/usr --root="$subpkgdir"
python3 setup.py install --prefix=/usr --root="$pkgdir"
# Add version suffix to executable files.
local path; for path in "$subpkgdir"/usr/bin/*; do
mv "$path" "$path-$pyver" || return 1
local path; for path in "$pkgdir"/usr/bin/*; do
mv "$path" "$path"-3
done
mkdir -p "$pkgdir"/usr/bin
ln -s unidecode-3 "$pkgdir"/usr/bin/unidecode
}
sha512sums="f3f48a1c06942caf06a9be29250af6f2ddb022cbee6236e2f9ab897af0b11517be3300b4a391dd89befd531b138eb1c163f9bfac178496c01ff2870b6a522f3e Unidecode-1.0.23.tar.gz"
sha512sums="5474f04be843ed94ddceb1a7e5f1ca986ee5f2e88ee35bd9347784c7a11b51e1d94d61e1a2a10dd2e71b3587c5b7b76717756f6cf4e2446d83222178c2360696 Unidecode-1.1.1.tar.gz"
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment