Date: Sunday, April 8, 2018 @ 05:39:59
  Author: felixonmars
Revision: 315020

upgpkg: python-httplib2 0.11.3-1

Modified:
  python-httplib2/trunk/PKGBUILD

----------+
 PKGBUILD |   52 +++++++++++++++++++++++++++++++---------------------
 1 file changed, 31 insertions(+), 21 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD    2018-04-08 05:25:51 UTC (rev 315019)
+++ PKGBUILD    2018-04-08 05:39:59 UTC (rev 315020)
@@ -9,48 +9,58 @@
 
 pkgbase=python-httplib2
 pkgname=(python-httplib2 python2-httplib2)
-pkgver=0.10.3
+pkgver=0.11.3
 pkgrel=1
 pkgdesc='Comprehensive HTTP client library, supporting many features'
 url='https://github.com/httplib2/httplib2'
 license=('MIT')
 arch=('any')
-makedepends=('python-setuptools' 'python2-setuptools' 'git')
-depends=('ca-certificates')
-provides=('httplib2')
-replaces=('httplib2')
-source=("git+https://github.com/httplib2/httplib2.git#tag=v$pkgver";
+makedepends=('ca-certificates' 'python-setuptools' 'python2-setuptools')
+checkdepends=('python-mock' 'python2-mock' 'python-pytest-cov' 
'python2-pytest-cov'
+              'python-pytest-runner' 'python2-pytest-runner' 
'python-pytest-timeout'
+              'python2-pytest-timeout')
+source=("$pkgbase-$pkgver.tar.gz::https://github.com/httplib2/httplib2/archive/v$pkgver.tar.gz";
         'cert.patch')
-sha256sums=('SKIP'
-            'ba05f491fd07afec6abc6bccb08369906f8e6f1a808d94a54fe4e7be7d9771d9')
+sha512sums=('d9e216901f1bdab9a43caa5d25ba5d39e851d391ebe257ee8be517964ce185aed2accab8a1caf93fc3ed018586445ab78c4e84f26ca647e0ab76810c2f06e741'
+            
'e260b86b222a65dffed151c5d2ee9ff16fd9d829e5932a5fa1cbb64b4e0195d70e4704733922091004f07d6d83ebe532aec07bc563b932f8e543dbce518b0714')
 
 prepare() {
-  pushd "${pkgbase/python-}"
+  cd httplib2-$pkgver
+  patch -p1 -i "$srcdir"/cert.patch
 
-  # Patch, ref FS#40179
-  patch -p1 -i "$srcdir/cert.patch"
+  cp -a "$srcdir"/httplib2-$pkgver{,-py2}
+}
 
-  popd
+build() {
+  cd "$srcdir"/httplib2-$pkgver
+  python setup.py build
 
-  # Prepare one build directory for each package
-  cp -a "${pkgbase/python-}" "${pkgname[0]}"
-  cp -a "${pkgbase/python-}" "${pkgname[1]}"
+  cd "$srcdir"/httplib2-$pkgver-py2
+  python2 setup.py build
 }
 
+check() {
+  cd "$srcdir"/httplib2-$pkgver
+  python setup.py pytest --addopts tests || warning "Tests failed"
+
+  cd "$srcdir"/httplib2-$pkgver-py2
+  python2 setup.py pytest --addopts tests || warning "Tests failed"
+}
+
 package_python-httplib2() {
-  depends=('python')
+  depends=('python' 'ca-certificates')
 
-  cd "$pkgname"
+  cd httplib2-$pkgver
   python setup.py install -O1 --root="$pkgdir"
-  install -Dm644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
+  install -Dm644 LICENSE "$pkgdir"/usr/share/licenses/$pkgname/LICENSE
 }
 
 package_python2-httplib2() {
-  depends=('python2')
+  depends=('python2' 'ca-certificates')
 
-  cd "$pkgname"
+  cd httplib2-$pkgver-py2
   python2 setup.py install -O1 --root="$pkgdir"
-  install -Dm644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
+  install -Dm644 LICENSE "$pkgdir"/usr/share/licenses/$pkgname/LICENSE
 }
 
 # vim:set ts=2 sw=2 et:

Reply via email to