Date: Saturday, October 26, 2019 @ 20:43:44 Author: foutrelis Revision: 520613
archrelease: copy trunk to community-staging-any Added: python-pytest-isort/repos/community-staging-any/ python-pytest-isort/repos/community-staging-any/PKGBUILD (from rev 520612, python-pytest-isort/trunk/PKGBUILD) ----------+ PKGBUILD | 55 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 55 insertions(+) Copied: python-pytest-isort/repos/community-staging-any/PKGBUILD (from rev 520612, python-pytest-isort/trunk/PKGBUILD) =================================================================== --- community-staging-any/PKGBUILD (rev 0) +++ community-staging-any/PKGBUILD 2019-10-26 20:43:44 UTC (rev 520613) @@ -0,0 +1,55 @@ +# Maintainer: Felix Yan <felixonm...@archlinux.org> + +pkgbase=python-pytest-isort +pkgname=('python-pytest-isort' 'python2-pytest-isort') +pkgver=0.3.1 +pkgrel=2 +pkgdesc='pytest plugin to perform isort checks (import ordering)' +arch=('any') +license=('BSD') +url='https://github.com/moccu/pytest-isort' +makedepends=('python-pytest-cache' 'python2-pytest-cache' 'python-isort' 'python2-isort') +source=("$pkgbase-$pkgver.tar.gz::https://github.com/moccu/pytest-isort/archive/$pkgver.tar.gz") +sha512sums=('453dc5c1098f749220111bf9df39ac0624626799c3b642009204edab5c4f5e540e2790b50c4337a5d0d42555eee45424c3938c86564e3d1822de0ab64d1350c5') + +prepare() { + cp -a pytest-isort-$pkgver{,-py2} +} + +build() { + cd "$srcdir"/pytest-isort-$pkgver + python setup.py build + + cd "$srcdir"/pytest-isort-$pkgver-py2 + python2 setup.py build +} + +check() { + # Hack entry points by installing it + + cd "$srcdir"/pytest-isort-$pkgver + python setup.py install --root="$PWD/tmp_install" --optimize=1 + PYTHONPATH="$PWD/tmp_install/usr/lib/python3.8/site-packages:$PYTHONPATH" py.test + + cd "$srcdir"/pytest-isort-$pkgver-py2 + python2 setup.py install --root="$PWD/tmp_install" --optimize=1 + PYTHONPATH="$PWD/tmp_install/usr/lib/python2.7/site-packages:$PYTHONPATH" py.test2 +} + +package_python-pytest-isort() { + depends=('python-pytest-cache' 'python-isort') + + cd pytest-isort-$pkgver + python setup.py install --root="$pkgdir" --optimize=1 + install -D -m644 LICENSE.rst "$pkgdir"/usr/share/licenses/$pkgname/LICENSE.rst +} + +package_python2-pytest-isort() { + depends=('python2-pytest-cache' 'python2-isort') + + cd pytest-isort-$pkgver-py2 + python2 setup.py install --root="$pkgdir" --optimize=1 + install -D -m644 LICENSE.rst "$pkgdir"/usr/share/licenses/$pkgname/LICENSE.rst +} + +# vim:set ts=2 sw=2 et: