Date: Tuesday, March 15, 2016 @ 16:18:26 Author: fyan Revision: 166827
upgpkg: python-logilab-common 1.2.0-1 Modified: python-logilab-common/trunk/PKGBUILD ----------+ PKGBUILD | 50 ++++++++++++++++++++++---------------------------- 1 file changed, 22 insertions(+), 28 deletions(-) Modified: PKGBUILD =================================================================== --- PKGBUILD 2016-03-15 15:12:35 UTC (rev 166826) +++ PKGBUILD 2016-03-15 15:18:26 UTC (rev 166827) @@ -6,7 +6,7 @@ pkgbase=python-logilab-common pkgname=('python2-logilab-common' 'python-logilab-common') -pkgver=1.1.0 +pkgver=1.2.0 pkgrel=1 pkgdesc="Useful miscellaneous modules used by Logilab projects" arch=('any') @@ -15,26 +15,35 @@ makedepends=('python-setuptools' 'python2-setuptools') checkdepends=('python-six' 'python2-six' 'python-pytz' 'python2-pytz' 'python2-egenix-mx-base') source=("https://pypi.python.org/packages/source/l/logilab-common/logilab-common-$pkgver.tar.gz") -sha1sums=('fec3fc5fbcb24c9b68dd750af0f1831be51acf89') +sha1sums=('07f00045569d289123e5aa55c23836e2387df2b2') prepare() { - cp -a logilab-common-${pkgver}{,-py3} + cp -a logilab-common-$pkgver{,-py2} } build() { - cd logilab-common-${pkgver} + cd "$srcdir"/logilab-common-$pkgver + python setup.py build + + cd "$srcdir"/logilab-common-$pkgver-py2 python2 setup.py build - - cd ../logilab-common-${pkgver}-py3 - python3 setup.py build } check() { - cd logilab-common-${pkgver} + cd "$srcdir"/logilab-common-$pkgver + PYTHONPATH="$PWD/build/lib:$PYTHONPATH" python bin/pytest + + cd "$srcdir"/logilab-common-$pkgver-py2 PYTHONPATH="$PWD/build/lib:$PYTHONPATH" python2 bin/pytest +} - cd ../logilab-common-${pkgver}-py3 - PYTHONPATH="$PWD/build/lib:$PYTHONPATH" python3 bin/pytest || warning "Tests failed" +package_python-logilab-common() { + depends=('python') + optdepends=('python-six: for logilab.common.testlib') + + cd "$srcdir"/logilab-common-$pkgver + + python setup.py install --optimize=1 --skip-build --prefix=/usr --root="$pkgdir" } package_python2-logilab-common() { @@ -41,24 +50,9 @@ depends=('python2') optdepends=('python2-six: for logilab.common.testlib') - cd "${srcdir}"/logilab-common-${pkgver} + cd "$srcdir"/logilab-common-$pkgver-py2 - python2 setup.py install --optimize=1 --skip-build --prefix=/usr --root="${pkgdir}" + python2 setup.py install --optimize=1 --skip-build --prefix=/usr --root="$pkgdir" - mv "${pkgdir}"/usr/bin/pytest{,2} - - # fix permissions ... - # find "${pkgdir}" -type f -exec chmod +r {} \; + mv "$pkgdir"/usr/bin/pytest{,2} } - -package_python-logilab-common() { - depends=('python') - optdepends=('python-six: for logilab.common.testlib') - - cd "${srcdir}"/logilab-common-${pkgver}-py3 - - python3 setup.py install --optimize=1 --skip-build --prefix=/usr --root="${pkgdir}" - - # fix permissions ... - # find "${pkgdir}" -type f -exec chmod +r {} \; -}