Date: Thursday, July 12, 2018 @ 20:59:41 Author: felixonmars Revision: 358218
archrelease: copy trunk to community-staging-any Added: python-httpretty/repos/community-staging-any/ python-httpretty/repos/community-staging-any/PKGBUILD (from rev 358217, python-httpretty/trunk/PKGBUILD) ----------+ PKGBUILD | 46 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) Copied: python-httpretty/repos/community-staging-any/PKGBUILD (from rev 358217, python-httpretty/trunk/PKGBUILD) =================================================================== --- community-staging-any/PKGBUILD (rev 0) +++ community-staging-any/PKGBUILD 2018-07-12 20:59:41 UTC (rev 358218) @@ -0,0 +1,46 @@ +# $Id$ +# Maintainer: Felix Yan <felixonm...@archlinux.org> + +pkgbase=python-httpretty +pkgname=("python-httpretty" "python2-httpretty") +pkgver=0.9.5 +pkgrel=2 +pkgdesc="HTTP client mock for Python" +arch=('any') +url="https://github.com/gabrielfalcao/httpretty" +license=('MIT') +makedepends=('python-urllib3' 'python2-urllib3' 'python-setuptools' 'python2-setuptools') +checkdepends=('python-nose' 'python2-nose' 'python-coverage' 'python2-coverage' 'python-mock' + 'python2-mock' 'python-sure' 'python2-sure' 'python-tornado' 'python2-tornado' + 'python-requests' 'python2-requests' 'python-httplib2' 'python2-httplib2' + 'python-nose-randomly' 'python2-nose-randomly' 'python-rednose' 'python2-rednose') +source=("$pkgbase-$pkgver.tar.gz::https://github.com/gabrielfalcao/HTTPretty/archive/$pkgver.tar.gz") +sha512sums=('6e830875cf51f4e9b2e248aa3395caf3950a05ce1df493d9e8b9f5cc9a2d1d1140e69d6e28f6c23acb388c91ef17d737d036736797e33186d20a25d21434184e') + +prepare() { + cp -a HTTPretty-$pkgver{,-py2} +} + +check() { + cd HTTPretty-$pkgver + nosetests3 -s tests || warning "Tests failed" + + cd ../HTTPretty-$pkgver-py2 + nosetests2 -s tests +} + +package_python-httpretty() { + depends=('python-urllib3') + + cd HTTPretty-$pkgver + python3 setup.py install --root="${pkgdir}" --optimize=1 + install -Dm644 COPYING "$pkgdir/usr/share/licenses/python-httpretty/COPYING" +} + +package_python2-httpretty() { + depends=('python2-urllib3') + + cd HTTPretty-$pkgver-py2 + python2 setup.py install --root="${pkgdir}" --optimize=1 + install -Dm644 COPYING "$pkgdir/usr/share/licenses/python2-httpretty/COPYING" +}