community/python-voluptuous to 0.11.7-4

This commit is contained in:
Kevin Mihelich 2020-02-13 19:45:34 +00:00
parent 2f9ecd101c
commit b44d99b453

View file

@ -1,18 +1,18 @@
# Maintainer: Felix Yan <felixonmars@archlinux.org> # Maintainer: Felix Yan <felixonmars@archlinux.org>
# ALARM: Kevin Mihelich <kevin@archlinuxarm.org> # ALARM: Kevin Mihelich <kevin@archlinuxarm.org>
# - remove makedepends on python-pypandoc, python2-pypandoc # - remove makedepends on python-pypandoc
pkgbase=python-voluptuous pkgname=python-voluptuous
pkgname=(python-voluptuous python2-voluptuous)
pkgver=0.11.7 pkgver=0.11.7
pkgrel=3 pkgrel=4
pkgdesc="A Python data validation library" pkgdesc="A Python data validation library"
url="https://github.com/alecthomas/voluptuous" url="https://github.com/alecthomas/voluptuous"
license=('BSD') license=('BSD')
arch=('any') arch=('any')
makedepends=('python-setuptools' 'python2-setuptools') depends=('python')
checkdepends=('python-nose' 'python2-nose') makedepends=('python-setuptools')
checkdepends=('python-nose')
source=("https://pypi.io/packages/source/v/voluptuous/voluptuous-$pkgver.tar.gz") source=("https://pypi.io/packages/source/v/voluptuous/voluptuous-$pkgver.tar.gz")
sha512sums=('bf0ad4684a4da59b3eccb54f6edfa643eb894076fc50d1bfd4c953de15cfd711a70e8aee685497197eaef24897ae55fb5fb2aec5e2fc9dcf344a6f7c6f569b88') sha512sums=('bf0ad4684a4da59b3eccb54f6edfa643eb894076fc50d1bfd4c953de15cfd711a70e8aee685497197eaef24897ae55fb5fb2aec5e2fc9dcf344a6f7c6f569b88')
@ -25,38 +25,20 @@ prepare() {
# Python 3.7 # Python 3.7
sed -i '/raise StopIteration/d' voluptuous-$pkgver/voluptuous/schema_builder.py sed -i '/raise StopIteration/d' voluptuous-$pkgver/voluptuous/schema_builder.py
cp -a voluptuous-$pkgver{,-py2}
} }
build() { build() {
cd "$srcdir"/voluptuous-$pkgver cd voluptuous-$pkgver
python setup.py build python setup.py build
cd "$srcdir"/voluptuous-$pkgver-py2
python2 setup.py build
} }
check() { check() {
cd "$srcdir"/voluptuous-$pkgver cd voluptuous-$pkgver
python setup.py nosetests python setup.py nosetests
cd "$srcdir"/voluptuous-$pkgver-py2
python2 setup.py nosetests
} }
package_python-voluptuous() { package() {
depends=('python')
cd voluptuous-$pkgver cd voluptuous-$pkgver
python setup.py install --root="$pkgdir" --optimize=1 python setup.py install --root="$pkgdir" --optimize=1
install -Dm644 COPYING "$pkgdir"/usr/share/licenses/$pkgname/COPYING install -Dm644 COPYING "$pkgdir"/usr/share/licenses/$pkgname/COPYING
} }
package_python2-voluptuous() {
depends=('python2')
cd voluptuous-$pkgver-py2
python2 setup.py install --root="$pkgdir" --optimize=1
install -Dm644 COPYING "$pkgdir"/usr/share/licenses/$pkgname/COPYING
}