upgpkg: wordpress 6.2.1-1
[ArchLinux/community.git] / python-translationstring / trunk / PKGBUILD
blob5e79700601fba04ce86df139b9ab5b11c1ad6a32
1 # Maintainer: Felix Yan <felixonmars@archlinux.org>
2 # Contributor: Sergey Mastykov <smastykov[at]gmail[dot]com>
4 pkgname=python-translationstring
5 pkgver=1.4
6 pkgrel=7
7 pkgdesc="Utility library for i18n relied on by various Repoze and Pyramid packages"
8 arch=('any')
9 license=('BSD')
10 url="https://github.com/Pylons/translationstring"
11 depends=('python')
12 makedepends=('python-setuptools')
13 checkdepends=('python-nose')
14 source=("https://github.com/Pylons/translationstring/archive/$pkgver/$pkgname-$pkgver.tar.gz")
15 sha512sums=('f470967e04701f7d5c27acefcd3c058d0b9c600115e2e33212d6855ef0eb932d025b8af0d2017202cf6e1893ef8023edd60453de1c45e495c88846627af200db')
17 prepare() {
18   cd translationstring-$pkgver
19   # Taken from upstream release workflow:
20   # https://github.com/Pylons/translationstring/blob/1.4/.github/workflows/main.yaml#L47
21   sed -ie "/version/s/=.*/='$pkgver',/" setup.py
24 build() {
25   cd translationstring-$pkgver
26   python setup.py build
29 check() {
30   cd translationstring-$pkgver
31   nosetests3
34 package() {
35   cd translationstring-$pkgver
36   python setup.py install --root="$pkgdir" --optimize=1
37   install -Dm644 LICENSE.txt -t "$pkgdir"/usr/share/licenses/$pkgname/