Date: Thursday, February 16, 2023 @ 08:11:59
  Author: grawlinson
Revision: 1400770

upgpkg: python-httplib2 0.21.0-3; add depends

* Add missing dependency: python-pyparsing.
* Switch from github tarball to git commit.
* Use PEP-517 build system.

Modified:
  python-httplib2/trunk/PKGBUILD

----------+
 PKGBUILD |   62 ++++++++++++++++++++++++++++++++++++++++++-------------------
 1 file changed, 43 insertions(+), 19 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD    2023-02-16 07:41:59 UTC (rev 1400769)
+++ PKGBUILD    2023-02-16 08:11:59 UTC (rev 1400770)
@@ -1,4 +1,5 @@
-# Maintainer: Felix Yan <[email protected]>
+# Maintainer: George Rawlinson <[email protected]>
+# Contributor: Felix Yan <[email protected]>
 # Contributor: Alexander Rødseth <[email protected]>
 # Contributor: Jan de Groot <[email protected]>
 # Contributor: Giorgio Lando <[email protected]>
@@ -6,16 +7,25 @@
 # Contributor: Jesse Young <[email protected]>
 # Contributor: Anton Eliasson <[email protected]>
 
-pkgbase=python-httplib2
 pkgname=python-httplib2
 pkgver=0.21.0
-pkgrel=2
+pkgrel=3
 pkgdesc='Comprehensive HTTP client library, supporting many features'
+arch=('any')
 url='https://github.com/httplib2/httplib2'
 license=('MIT')
-arch=('any')
-depends=('python' 'ca-certificates')
-makedepends=('python-setuptools')
+depends=(
+  'ca-certificates'
+  'python'
+  'python-pyparsing'
+)
+makedepends=(
+  'git'
+  'python-build'
+  'python-installer'
+  'python-wheel'
+  'python-setuptools'
+)
 checkdepends=(
   'flake8'
   'python-pytest-cov'
@@ -27,34 +37,48 @@
   'python-cryptography'
   'python-six'
 )
+_commit='3094c64ee75e13530c62217180bf2a983084257e'
 source=(
-  
"$pkgbase-$pkgver.tar.gz::https://github.com/httplib2/httplib2/archive/v$pkgver.tar.gz";
-  'cert.patch'
+  "$pkgname::git+$url#commit=$_commit"
+  'use-system-certificates.patch'
 )
-sha512sums=('8269014f05f5e4b668c7dea8ae708b27a60b4216d712a93ab58b74f399ab5bc0dcdcd8c1411ccff587c7bdb6bc20917451ad969e5bef2d5c5262327cabe17bbb'
-            
'503719fb07b9ff1f06f252b73804787759139098dba990a7dcd9e9b3602f7271d2251e703993636b249b3597c9a240c721c536a4fe31526ec4ba9441f6c8da56')
+sha512sums=('SKIP'
+            
'cb767cf95177d5a3c40dce49db0759b75a4ef3b9182ee931370386d7f380586818d8d940119907fe7a6b85504377571eb52176dcacbb37197cc85a5ae48fc149')
 
+
+pkgver() {
+  cd "$pkgname"
+
+  git describe --tags | sed 's/^v//'
+}
+
 prepare() {
-  cd httplib2-$pkgver
-  patch -p0 -i "$srcdir"/cert.patch
-  sed -i 's/==/>=/' requirements-test.txt
+  cd "$pkgname"
+
+  patch -p1 -i "$srcdir/use-system-certificates.patch"
+
+  sed -e 's/==/>=/' -i requirements-test.txt
 }
 
 build() {
-  cd "$srcdir"/httplib2-$pkgver
-  python setup.py build
+  cd "$pkgname"
+
+  python -m build --wheel --no-isolation
 }
 
 check() {
-  cd httplib2-$pkgver
+  cd "$pkgname"
   # test_client_cert_password_verified fails with cryptography 36 
https://github.com/httplib2/httplib2/issues/221
   PYTHONPATH=build/lib pytest -k 'not test_client_cert_password_verified'
 }
 
 package() {
-  cd httplib2-$pkgver
-  python setup.py install -O1 --root="$pkgdir"
-  install -Dm644 LICENSE "$pkgdir"/usr/share/licenses/$pkgname/LICENSE
+  cd "$pkgname"
+
+  python setup.py install --root="$pkgdir" --optimize=1
+
+  # license
+  install -vDm644 -t "$pkgdir/usr/share/licenses/$pkgname" LICENSE
 }
 
 # vim:set ts=2 sw=2 et:

Reply via email to