Date: Monday, November 9, 2020 @ 19:52:25
  Author: felixonmars
Revision: 748084

archrelease: copy trunk to community-staging-any

Added:
  python-pytest-cache/repos/community-staging-any/
  python-pytest-cache/repos/community-staging-any/PKGBUILD
    (from rev 748083, python-pytest-cache/trunk/PKGBUILD)

----------+
 PKGBUILD |   58 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 58 insertions(+)

Copied: python-pytest-cache/repos/community-staging-any/PKGBUILD (from rev 
748083, python-pytest-cache/trunk/PKGBUILD)
===================================================================
--- community-staging-any/PKGBUILD                              (rev 0)
+++ community-staging-any/PKGBUILD      2020-11-09 19:52:25 UTC (rev 748084)
@@ -0,0 +1,58 @@
+# Maintainer: Felix Yan <felixonm...@archlinux.org>
+
+pkgbase=python-pytest-cache
+pkgname=('python-pytest-cache' 'python2-pytest-cache')
+_name=pytest-cache
+pkgver=1.0
+pkgrel=7
+pkgdesc='pytest plugin with mechanisms for caching across test runs'
+arch=('any')
+license=('MIT')
+url='https://pypi.org/project/pytest-cache/'
+makedepends=('python-setuptools' 'python-pytest' 'python2-pytest' 
'python-execnet' 'python2-execnet')
+source=(https://files.pythonhosted.org/packages/source/${_name::1}/$_name/$_name-$pkgver.tar.gz)
+sha256sums=('be7468edd4d3d83f1e844959fd6e3fd28e77a481440a7118d430130ea31b07a9')
+
+prepare() {
+  cp -a "${srcdir}/${_name}-${pkgver}"{,-py2}
+}
+
+build() {
+  cd "$srcdir/$_name-$pkgver"
+  python setup.py build
+
+  cd "$srcdir/$_name-$pkgver-py2"
+  python2 setup.py build
+}
+
+check() {(
+  # Hack entry points by installing it
+
+  cd "$srcdir/$_name-$pkgver"
+  python setup.py install --root="$PWD/tmp_install" --optimize=1
+  PYTHONPATH="$PWD/tmp_install/usr/lib/python3.9/site-packages:$PYTHONPATH" 
py.test
+
+  cd "$srcdir/$_name-$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
+  ) || echo "Tests failed"
+  # Skipping tests as it's incompatibility with pytest 2.8.0, not python 3.5.
+  # 
https://bitbucket.org/hpk42/pytest-cache/issues/11/tests-failed-with-pytest-280
+}
+
+package_python-pytest-cache() {
+  depends=('python-pytest' 'python-execnet')
+
+  cd "$srcdir/$_name-$pkgver"
+  python setup.py install --root="$pkgdir"/ --optimize=1
+  install -D -m644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
+}
+
+package_python2-pytest-cache() {
+  depends=('python2-pytest' 'python2-execnet')
+
+  cd "$srcdir/$_name-$pkgver-py2"
+  python2 setup.py install --root="$pkgdir"/ --optimize=1
+  install -D -m644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
+}
+# vim:set ts=2 sw=2 et:

Reply via email to