Date: Wednesday, July 26, 2017 @ 15:18:30 Author: felixonmars Revision: 246437
addpkg: python-treq 17.3.1-1 Added: python-treq/ python-treq/repos/ python-treq/trunk/ python-treq/trunk/PKGBUILD ----------+ PKGBUILD | 60 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 60 insertions(+) Added: python-treq/trunk/PKGBUILD =================================================================== --- python-treq/trunk/PKGBUILD (rev 0) +++ python-treq/trunk/PKGBUILD 2017-07-26 15:18:30 UTC (rev 246437) @@ -0,0 +1,60 @@ +# $Id$ +# Maintainer: Felix Yan <[email protected]> + +pkgbase=python-treq +pkgname=('python-treq' 'python2-treq') +pkgver=17.3.1 +pkgrel=1 +pkgdesc="A requests-like API built on top of twisted.web's Agent" +arch=('any') +license=('MIT') +url='https://github.com/twisted/treq' +makedepends=('python-setuptools' 'python2-setuptools' 'python-incremental' 'python2-incremental' + 'python-requests' 'python2-requests' 'python2-pyopenssl' 'python-pyopenssl' + 'python-service-identity' 'python2-service-identity' 'python-idna' 'python2-idna' + 'python-attrs' 'python2-attrs' 'python-twisted' 'python2-twisted') +checkdepends=('python-mock' 'python2-mock') +source=("$pkgbase-$pkgver.tar.gz::https://github.com/twisted/treq/archive/release-$pkgver.tar.gz") +sha512sums=('43f166bd499d1ee9993c63a89fefa193aa57e7a37303f267ae80b6fd0d19233426c4bb5e1ce58a72211ee24bd3d318dd0c44c4993a02191862986383e54eeac1') + +prepare() { + cp -a treq-release-$pkgver{,-py2} +} + +build() { + cd "$srcdir"/treq-release-$pkgver + python setup.py build + + cd "$srcdir"/treq-release-$pkgver-py2 + python2 setup.py build +} + +check() { + # https://github.com/twisted/treq/issues/198 + + cd "$srcdir"/treq-release-$pkgver + PYTHONPATH="$PWD/build/lib:$PYTHONPATH" trial3 treq || warning "Tests failed" + + cd "$srcdir"/treq-release-$pkgver-py2 + PYTHONPATH="$PWD/build/lib:$PYTHONPATH" trial treq || warning "Tests failed" +} + +package_python-treq() { + depends=('python-incremental' 'python-requests' 'python-pyopenssl' 'python-service-identity' + 'python-idna' 'python-attrs' 'python-twisted') + + cd treq-release-$pkgver + python setup.py install --root="$pkgdir" --optimize=1 + install -D -m644 LICENSE "$pkgdir"/usr/share/licenses/$pkgname/LICENSE +} + +package_python2-treq() { + depends=('python2-incremental' 'python2-requests' 'python2-pyopenssl' 'python2-service-identity' + 'python2-idna' 'python2-attrs' 'python2-twisted') + + cd treq-release-$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: Property changes on: python-treq/trunk/PKGBUILD ___________________________________________________________________ Added: svn:keywords ## -0,0 +1 ## +Id \ No newline at end of property
