Date: Saturday, April 1, 2017 @ 04:55:29 Author: felixonmars Revision: 220204
upgpkg: python-pytest-mock 1.6.0-1 Modified: python-pytest-mock/trunk/PKGBUILD ----------+ PKGBUILD | 31 +++++++++++++++++-------------- 1 file changed, 17 insertions(+), 14 deletions(-) Modified: PKGBUILD =================================================================== --- PKGBUILD 2017-04-01 04:52:47 UTC (rev 220203) +++ PKGBUILD 2017-04-01 04:55:29 UTC (rev 220204) @@ -3,25 +3,28 @@ pkgbase=python-pytest-mock pkgname=('python-pytest-mock' 'python2-pytest-mock') -pkgver=1.5.0 -pkgrel=2 +pkgver=1.6.0 +pkgrel=1 pkgdesc="Thin-wrapper around the mock package for easier use with py.test" arch=('any') license=('LGPL3') url="https://github.com/pytest-dev/pytest-mock/" -makedepends=('python-pytest' 'python2-pytest' 'python2-mock' 'git') -source=("git+https://github.com/pytest-dev/pytest-mock.git#tag=v$pkgver") -sha512sums=('SKIP') +makedepends=('python-pytest' 'python2-pytest' 'python2-mock' 'python-setuptools-scm' + 'python2-setuptools-scm') +source=("$pkgbase-$pkgver.tar.gz::https://github.com/pytest-dev/pytest-mock/archive/v$pkgver.tar.gz") +sha512sums=('be2c49f35368168d3423881353041492f316082e949ba6d57888887b0abbcffee8648193f2e05fab0280e7d1f27f0d5bd068333b6b0e581497e833da400379ae') prepare() { - cp -a pytest-mock{,-py2} + cp -a pytest-mock-$pkgver{,-py2} + + export SETUPTOOLS_SCM_PRETEND_VERSION=$pkgver } build() { - cd "$srcdir"/pytest-mock + cd "$srcdir"/pytest-mock-$pkgver python setup.py build - cd "$srcdir"/pytest-mock-py2 + cd "$srcdir"/pytest-mock-$pkgver-py2 python2 setup.py build } @@ -28,11 +31,11 @@ check() { # Hack entry points by installing it - cd "$srcdir"/pytest-mock + cd "$srcdir"/pytest-mock-$pkgver python setup.py install --root="$PWD/tmp_install" --optimize=1 PYTHONPATH="$PWD/tmp_install/usr/lib/python3.6/site-packages:$PYTHONPATH:$PWD/tests" py.test - cd "$srcdir"/pytest-mock-py2 + cd "$srcdir"/pytest-mock-$pkgver-py2 python2 setup.py install --root="$PWD/tmp_install" --optimize=1 PYTHONPATH="$PWD/tmp_install/usr/lib/python2.7/site-packages:$PYTHONPATH:$PWD/tests" py.test2 } @@ -40,13 +43,13 @@ package_python-pytest-mock() { depends=('python-pytest') - cd pytest-mock - python setup.py install --root="${pkgdir}" --optimize=1 + cd pytest-mock-$pkgver + python setup.py install --root="$pkgdir" --optimize=1 } package_python2-pytest-mock() { depends=('python2-pytest' 'python2-mock') - cd pytest-mock-py2 - python2 setup.py install --root="${pkgdir}" --optimize=1 + cd pytest-mock-$pkgver-py2 + python2 setup.py install --root="$pkgdir" --optimize=1 }