mirror of
https://github.com/archlinuxarm/PKGBUILDs.git
synced 2024-11-18 22:54:00 +00:00
added community/python-voluptuous
This commit is contained in:
parent
ed82575527
commit
15cc430778
1 changed files with 60 additions and 0 deletions
60
community/python-voluptuous/PKGBUILD
Normal file
60
community/python-voluptuous/PKGBUILD
Normal file
|
@ -0,0 +1,60 @@
|
|||
# $Id$
|
||||
# Maintainer: Felix Yan <felixonmars@archlinux.org>
|
||||
|
||||
# ALARM: Kevin Mihelich <kevin@archlinuxarm.org>
|
||||
# - remove makedepends on python-pypandoc, python2-pypandoc
|
||||
|
||||
pkgbase=python-voluptuous
|
||||
pkgname=(python-voluptuous python2-voluptuous)
|
||||
pkgver=0.11.1
|
||||
pkgrel=1
|
||||
pkgdesc="A Python data validation library"
|
||||
url="https://github.com/alecthomas/voluptuous"
|
||||
license=('BSD')
|
||||
arch=('any')
|
||||
makedepends=('python-setuptools' 'python2-setuptools')
|
||||
checkdepends=('python-nose' 'python2-nose')
|
||||
source=("https://pypi.io/packages/source/v/voluptuous/voluptuous-$pkgver.tar.gz")
|
||||
sha512sums=('7e2f3ea122f739944a7820a536551abc45df9847a0c3daf5527eabd781b904706ea708c885d724828cfdaaac66774d2f8e7b42d3376de1c78ef2be9f535fd58f')
|
||||
|
||||
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
|
||||
|
||||
cp -a voluptuous-$pkgver{,-py2}
|
||||
}
|
||||
|
||||
build() {
|
||||
cd "$srcdir"/voluptuous-$pkgver
|
||||
python setup.py build
|
||||
|
||||
cd "$srcdir"/voluptuous-$pkgver-py2
|
||||
python2 setup.py build
|
||||
}
|
||||
|
||||
check() {
|
||||
cd "$srcdir"/voluptuous-$pkgver
|
||||
python setup.py nosetests
|
||||
|
||||
cd "$srcdir"/voluptuous-$pkgver-py2
|
||||
python2 setup.py nosetests
|
||||
}
|
||||
|
||||
package_python-voluptuous() {
|
||||
depends=('python')
|
||||
|
||||
cd voluptuous-$pkgver
|
||||
python setup.py install --root="$pkgdir" --optimize=1
|
||||
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
|
||||
}
|
Loading…
Reference in a new issue