2018-02-25 22:57:41 +00:00
|
|
|
# Maintainer: Felix Yan <felixonmars@archlinux.org>
|
|
|
|
|
|
|
|
# ALARM: Kevin Mihelich <kevin@archlinuxarm.org>
|
2020-02-13 19:45:34 +00:00
|
|
|
# - remove makedepends on python-pypandoc
|
2018-02-25 22:57:41 +00:00
|
|
|
|
2020-02-13 19:45:34 +00:00
|
|
|
pkgname=python-voluptuous
|
2019-08-23 13:04:46 +00:00
|
|
|
pkgver=0.11.7
|
2020-02-13 19:45:34 +00:00
|
|
|
pkgrel=4
|
2018-02-25 22:57:41 +00:00
|
|
|
pkgdesc="A Python data validation library"
|
|
|
|
url="https://github.com/alecthomas/voluptuous"
|
|
|
|
license=('BSD')
|
|
|
|
arch=('any')
|
2020-02-13 19:45:34 +00:00
|
|
|
depends=('python')
|
|
|
|
makedepends=('python-setuptools')
|
|
|
|
checkdepends=('python-nose')
|
2018-02-25 22:57:41 +00:00
|
|
|
source=("https://pypi.io/packages/source/v/voluptuous/voluptuous-$pkgver.tar.gz")
|
2019-08-23 13:04:46 +00:00
|
|
|
sha512sums=('bf0ad4684a4da59b3eccb54f6edfa643eb894076fc50d1bfd4c953de15cfd711a70e8aee685497197eaef24897ae55fb5fb2aec5e2fc9dcf344a6f7c6f569b88')
|
2018-02-25 22:57:41 +00:00
|
|
|
|
|
|
|
prepare() {
|
|
|
|
# https://github.com/alecthomas/voluptuous/issues/333
|
|
|
|
rm -r voluptuous-$pkgver/*.egg-info
|
|
|
|
|
|
|
|
# https://github.com/alecthomas/voluptuous/pull/332
|
|
|
|
sed -e "s/'w'/'wb'/" -e "s/.encode('utf-8')//" -e "s/f.write(long_description)/f.write(long_description.encode('utf-8'))/" -i voluptuous-$pkgver/setup.py
|
|
|
|
|
2018-08-06 13:14:07 +00:00
|
|
|
# Python 3.7
|
|
|
|
sed -i '/raise StopIteration/d' voluptuous-$pkgver/voluptuous/schema_builder.py
|
2018-02-25 22:57:41 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
build() {
|
2020-02-13 19:45:34 +00:00
|
|
|
cd voluptuous-$pkgver
|
2018-02-25 22:57:41 +00:00
|
|
|
python setup.py build
|
|
|
|
}
|
|
|
|
|
|
|
|
check() {
|
2020-02-13 19:45:34 +00:00
|
|
|
cd voluptuous-$pkgver
|
2018-02-25 22:57:41 +00:00
|
|
|
python setup.py nosetests
|
|
|
|
}
|
|
|
|
|
2020-02-13 19:45:34 +00:00
|
|
|
package() {
|
2018-02-25 22:57:41 +00:00
|
|
|
cd voluptuous-$pkgver
|
|
|
|
python setup.py install --root="$pkgdir" --optimize=1
|
|
|
|
install -Dm644 COPYING "$pkgdir"/usr/share/licenses/$pkgname/COPYING
|
|
|
|
}
|