Date: Tuesday, April 12, 2016 @ 17:39:46 Author: fyan Revision: 170770
upgpkg: python-pbr 1.9.0-1 Modified: python-pbr/trunk/PKGBUILD ----------+ PKGBUILD | 62 ++++++++++++++++++++++++++++++++++++++----------------------- 1 file changed, 39 insertions(+), 23 deletions(-) Modified: PKGBUILD =================================================================== --- PKGBUILD 2016-04-12 15:35:19 UTC (rev 170769) +++ PKGBUILD 2016-04-12 15:39:46 UTC (rev 170770) @@ -1,43 +1,59 @@ # $Id$ -# Maintainer: Daniel Wallace <danielwallace at gtmanfred dot com> +# Maintainer: Felix Yan <felixonm...@archlinux.org> +# Contributor: Daniel Wallace <danielwallace at gtmanfred dot com> # Contributor: Limao Luo <luolimao+...@gmail.com> pkgbase=python-pbr pkgname=(python-pbr python2-pbr) -pkgver=1.8.1 +pkgver=1.9.0 pkgrel=1 pkgdesc="Python Build Reasonableness" arch=('any') url=https://pypi.python.org/pypi/pbr -license=(Apache) -makedepends=(python2-setuptools python-setuptools git) -source=(http://pypi.python.org/packages/source/p/${pkgname#*-}/${pkgname#*-}-$pkgver.tar.gz) -sha256sums=('e2127626a91e6c885db89668976db31020f0af2da728924b56480fc7ccf09649') -sha512sums=('909b3ef463787d68f75f300b483ffb7d1e54ef246ed893ab5cf84e5489e171b67b77c90a1f90259ca274eeb286a66a3f221d5e0c17df5d14d0aa263d36ba6eb4') +license=('Apache') +makedepends=('python2-setuptools' 'python-setuptools' 'git') +checkdepends=('python-testscenarios' 'python2-testscenarios' 'python-testrepository' 'python2-testrepository' + 'python-testresources' 'python2-testresources' 'python-mock' 'python2-mock' 'python-virtualenv' + 'python2-virtualenv' 'python-wheel' 'python2-wheel' 'python-sphinx' 'python2-sphinx') +source=(http://pypi.python.org/packages/source/p/pbr/pbr-$pkgver.tar.gz) +sha512sums=('1be1c9d610fbde82dcd81892deef3fb7b5b1e16dad6934ff3f41e8f77108b9e807a0ceaeeb2dddabecb243719f562a9701a6bf351f370e2fca4e643e86a75664') prepare() { - cp -a ${pkgname#*-}-$pkgver python2-pbr-$pkgver - find python2-pbr-$pkgver -name \*.py -exec sed -i '1s/python$/&2/' {} + + cp -a pbr-$pkgver{,-py2} + + find pbr-$pkgver-py2 -name \*.py -exec sed -i '1s/python$/&2/' {} + } build() { - export SKIP_PIP_INSTALL=1 - cd ${pkgname#*-}-$pkgver/ - python setup.py build - cd $srcdir/python2-pbr-$pkgver - python2 setup.py build + cd "$srcdir"/pbr-$pkgver + python setup.py build + + cd "$srcdir"/pbr-$pkgver-py2 + python2 setup.py build } +check() { + cd "$srcdir"/pbr-$pkgver + python setup.py test || warning "Tests failed" + + cd "$srcdir"/pbr-$pkgver-py2 + PYTHON=python2 python2 setup.py test || warning "Tests failed" +} + package_python-pbr() { - cd ${pkgname#*-}-$pkgver/ - depends=(python-pip) - python setup.py install --prefix=/usr --root="$pkgdir" - install -Dm644 LICENSE "$pkgdir"/usr/share/licenses/$pkgname/LICENSE + depends=('python-setuptools') + + cd pbr-$pkgver + python setup.py install -O1 --root="$pkgdir" + install -Dm644 LICENSE "$pkgdir"/usr/share/licenses/$pkgname/LICENSE } + package_python2-pbr() { - cd $pkgname-$pkgver/ - depends=(python2-pip) - python2 setup.py install --prefix=/usr --root="$pkgdir" - install -Dm644 LICENSE "$pkgdir"/usr/share/licenses/$pkgname/LICENSE - mv $pkgdir/usr/bin/pbr{,2} + depends=('python2-setuptools') + + cd pbr-$pkgver-py2 + python2 setup.py install -O1 --root="$pkgdir" + install -Dm644 LICENSE "$pkgdir"/usr/share/licenses/$pkgname/LICENSE + + mv "$pkgdir"/usr/bin/pbr{,2} }