[arch-commits] Commit in python-pytest-cache/trunk (PKGBUILD)

Evangelos Foutras foutrelis at archlinux.org
Mon Nov 9 19:48:10 UTC 2020


    Date: Monday, November 9, 2020 @ 19:48:10
  Author: foutrelis
Revision: 748082

Build from pypi tarball

Modified:
  python-pytest-cache/trunk/PKGBUILD

----------+
 PKGBUILD |   24 ++++++++++++------------
 1 file changed, 12 insertions(+), 12 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2020-11-09 19:37:24 UTC (rev 748081)
+++ PKGBUILD	2020-11-09 19:48:10 UTC (rev 748082)
@@ -2,26 +2,26 @@
 
 pkgbase=python-pytest-cache
 pkgname=('python-pytest-cache' 'python2-pytest-cache')
-_pypiname=pytest-cache
+_name=pytest-cache
 pkgver=1.0
 pkgrel=6
 pkgdesc='pytest plugin with mechanisms for caching across test runs'
 arch=('any')
 license=('MIT')
-url='https://bitbucket.org/hpk42/pytest-cache/'
-makedepends=('python-pytest' 'python2-pytest' 'python-execnet' 'python2-execnet' 'mercurial')
-source=("hg+https://bitbucket.org/hpk42/pytest-cache#tag=$pkgver")
-md5sums=('SKIP')
+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}/${_pypiname}"{,-py2}
+  cp -a "${srcdir}/${_name}-${pkgver}"{,-py2}
 }
 
 build() {
-  cd "$srcdir/$_pypiname"
+  cd "$srcdir/$_name-$pkgver"
   python setup.py build
 
-  cd "$srcdir/$_pypiname-py2"
+  cd "$srcdir/$_name-$pkgver-py2"
   python2 setup.py build
 }
 
@@ -28,11 +28,11 @@
 check() {(
   # Hack entry points by installing it
 
-  cd "$srcdir/$_pypiname"
+  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/$_pypiname-py2"
+  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"
@@ -43,7 +43,7 @@
 package_python-pytest-cache() {
   depends=('python-pytest' 'python-execnet')
 
-  cd "$srcdir/$_pypiname"
+  cd "$srcdir/$_name-$pkgver"
   python setup.py install --root="$pkgdir"/ --optimize=1
   install -D -m644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
 }
@@ -51,7 +51,7 @@
 package_python2-pytest-cache() {
   depends=('python2-pytest' 'python2-execnet')
 
-  cd "$srcdir/$_pypiname-py2"
+  cd "$srcdir/$_name-$pkgver-py2"
   python2 setup.py install --root="$pkgdir"/ --optimize=1
   install -D -m644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
 }



More information about the arch-commits mailing list