Date: Tuesday, June 5, 2018 @ 10:45:52 Author: foxboron Revision: 340504
upgpkg: python-pycountry 18.5.26-2 Fixed PKGBUILD Modified: python-pycountry/trunk/PKGBUILD ----------+ PKGBUILD | 42 +++++++++++++++++++++++++++++++++--------- 1 file changed, 33 insertions(+), 9 deletions(-) Modified: PKGBUILD =================================================================== --- PKGBUILD 2018-06-05 10:34:35 UTC (rev 340503) +++ PKGBUILD 2018-06-05 10:45:52 UTC (rev 340504) @@ -1,29 +1,53 @@ # $Id$ -# Maintainer: Giovanni Scafora <[email protected]> +# Maintainer: Morten Linderud <[email protected]> +# Contibutor: Giovanni Scafora <[email protected]> # Contributor: Pawel "kTT" Salata <[email protected]> pkgbase=python-pycountry pkgname=(python-pycountry python2-pycountry) pkgver=18.5.26 -pkgrel=1 +pkgrel=2 pkgdesc="ISO country, subdivision, language, currency and script definitions and their translations" arch=('any') url="http://pypi.python.org/pypi/pycountry" license=('LGPL2.1') -makedepends=('python2-setuptools' 'python-setuptools') +makedepends=('python2' 'python2-setuptools' + 'python' 'python-setuptools') +checkdepends=('python2-pytest' 'python2-pytest-runner' + 'python-pytest' 'python-pytest-runner') source=("https://pypi.io/packages/source/p/pycountry/pycountry-${pkgver}.tar.gz") sha512sums=('9760175a7926347920542a2fd2420cc3d4f36ac11df5aa6f7aaabbd9b46dd9cb61801933133a589ed35fd2e279db2a70e98340d8cf8856987dc88d6fdb715437') -package_python2-pycountry() { - depends=(python2-lxml) +prepare(){ + cp -r pycountry-${pkgver}{,-py2} +} + +build(){ cd "${srcdir}/pycountry-${pkgver}" + python setup.py build - python2 setup.py install --root="$pkgdir/" --optimize=1 + cd "${srcdir}/pycountry-${pkgver}-py2" + python2 setup.py build } +check(){ + cd "${srcdir}/pycountry-${pkgver}" + python setup.py pytest + + cd "${srcdir}/pycountry-${pkgver}-py2" + python2 setup.py pytest +} + + +package_python2-pycountry() { + depends=(python python2-lxml) + cd "${srcdir}/pycountry-${pkgver}" + python2 setup.py install --root="$pkgdir/" --optimize=1 --skip-build +} + package_python-pycountry() { - depends=(python-lxml) + depends=(python python-lxml) cd "${srcdir}/pycountry-${pkgver}" + python setup.py install --root="$pkgdir/" --optimize=1 --skip-build +} - python setup.py install --root="$pkgdir/" --optimize=1 -}
