desktop/python-fields/PKGBUILD

58 lines
1.4 KiB
Bash

# $Id$
# Maintainer: Felix Yan <felixonmars@archlinux.org>
pkgbase=python-fields
pkgname=('python3-fields' 'python2-fields')
pkgver=5.0.0
pkgrel=2
arch=('any')
pkgdesc='A totally different take on container boilerplate'
url='https://github.com/ionelmc/python-fields'
license=('BSD')
makedepends=('python3-setuptools' 'python2-setuptools' 'git')
checkdepends=(
'python3-pytest-benchmark' 'python2-pytest-benchmark'
'python3-pytest-runner' 'python2-pytest-runner' 'python3-attrs'
'python2-attrs' 'python3-characteristic' 'python2-characteristic')
source=("git+https://github.com/ionelmc/python-fields.git#tag=v$pkgver")
sha512sums=('SKIP')
prepare() {
cp -a python-fields{,-py2}
}
build() {
cd "$srcdir"/python-fields
python3 setup.py build
cd "$srcdir"/python-fields-py2
python2 setup.py build
}
check() {
# To workaround an error in doctest
export LC_CTYPE=en_US.UTF-8
cd "$srcdir"/python-fields
python3 setup.py ptr
cd "$srcdir"/python-fields-py2
python2 setup.py ptr
}
package_python3-fields() {
depends=('python3')
cd python-fields
python3 setup.py install --root "$pkgdir" --optimize=1
install -D -m644 LICENSE "$pkgdir"/usr/share/licenses/$pkgname/LICENSE
}
package_python2-fields() {
depends=('python2')
cd python-fields-py2
python2 setup.py install --root "$pkgdir" --optimize=1
install -D -m644 LICENSE "$pkgdir"/usr/share/licenses/$pkgname/LICENSE
}