[arch-commits] Commit in python-pretend/trunk (PKGBUILD)
Felix Yan
felixonmars at archlinux.org
Sun Apr 15 15:55:08 UTC 2018
Date: Sunday, April 15, 2018 @ 15:55:07
Author: felixonmars
Revision: 316382
upgpkg: python-pretend 1.0.9-1
Modified:
python-pretend/trunk/PKGBUILD
----------+
PKGBUILD | 32 ++++++++++++++++++++++++--------
1 file changed, 24 insertions(+), 8 deletions(-)
Modified: PKGBUILD
===================================================================
--- PKGBUILD 2018-04-15 15:54:24 UTC (rev 316381)
+++ PKGBUILD 2018-04-15 15:55:07 UTC (rev 316382)
@@ -3,23 +3,41 @@
pkgbase=python-pretend
pkgname=('python-pretend' 'python2-pretend')
-pkgver=1.0.8
-pkgrel=4
+pkgver=1.0.9
+pkgrel=1
pkgdesc="A library for stubbing in Python"
arch=('any')
license=('BSD')
url="https://github.com/alex/pretend"
makedepends=('python-setuptools' 'python2-setuptools')
-source=("https://pypi.python.org/packages/source/p/pretend/pretend-$pkgver.tar.gz")
+checkdepends=('python-pytest-runner' 'python2-pytest-runner')
+source=("$pkgbase-$pkgver.tar.gz::https://github.com/alex/pretend/archive/v$pkgver.tar.gz")
+sha512sums=('976e3272557aecfb11e4147a868ea96e23546e277d57d726f41b945103bef3451039716e6bbc5082d691fa1fd331c06b3d0f8b254deb0510948153571326eaf0')
prepare() {
- cp -a pretend-${pkgver}{,-py2}
+ cp -a pretend-$pkgver{,-py2}
}
+build() {
+ cd "$srcdir"/pretend-$pkgver
+ python setup.py build
+
+ cd "$srcdir"/pretend-$pkgver-py2
+ python2 setup.py build
+}
+
+check() {
+ cd "$srcdir"/pretend-$pkgver
+ python setup.py pytest
+
+ cd "$srcdir"/pretend-$pkgver-py2
+ python2 setup.py pytest
+}
+
package_python-pretend() {
depends=('python')
- cd pretend-${pkgver}
+ cd pretend-$pkgver
python setup.py install --root="${pkgdir}" --optimize=1
install -D -m644 LICENSE.rst "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE.rst"
}
@@ -27,9 +45,7 @@
package_python2-pretend() {
depends=('python2')
- cd pretend-${pkgver}-py2
+ cd pretend-$pkgver-py2
python2 setup.py install --root="${pkgdir}" --optimize=1
install -D -m644 LICENSE.rst "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE.rst"
}
-
-sha512sums=('25011216947289d340fb979ebc9e2c7f000571f006cf5ce15f10ff0e013164e4329a3a66933d202acf8ced498929cf9e5a2a3666aafa00f78348400615c5cec8')
More information about the arch-commits
mailing list