Date: Thursday, April 13, 2023 @ 04:51:11
  Author: felixonmars
Revision: 1445364

upgpkg: python-httpretty 1.1.4-5: rebuild with python 3.11

Modified:
  python-httpretty/trunk/PKGBUILD

----------+
 PKGBUILD |   27 ++++++++++++++++++++-------
 1 file changed, 20 insertions(+), 7 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD    2023-04-13 04:50:59 UTC (rev 1445363)
+++ PKGBUILD    2023-04-13 04:51:11 UTC (rev 1445364)
@@ -2,7 +2,7 @@
 
 pkgname=python-httpretty
 pkgver=1.1.4
-pkgrel=4
+pkgrel=5
 pkgdesc="HTTP client mock for Python"
 arch=('any')
 url="https://github.com/gabrielfalcao/httpretty";
@@ -12,16 +12,29 @@
 checkdepends=('python-nose' 'python-coverage' 'python-eventlet' 
'python-freezegun' 'python-httplib2'
               'python-redis' 'python-rednose' 'python-requests' 'python-sure' 
'python-tornado'
               'python-httpx' 'python-boto3')
-source=("https://github.com/gabrielfalcao/HTTPretty/archive/$pkgver/$pkgname-$pkgver.tar.gz";)
-sha512sums=('58c733ba4719f97e06e2313bb6b94f1c6609d3facb2e0262ac37be97f1c3430eac661611ba9b3712c9c1809846e177b61f3fc2945f3770d475f70b81bea2aced')
+source=("https://github.com/gabrielfalcao/HTTPretty/archive/$pkgver/$pkgname-$pkgver.tar.gz";
+        
$pkgname-drop-mock.patch::https://github.com/gabrielfalcao/HTTPretty/pull/452.patch)
+sha512sums=('58c733ba4719f97e06e2313bb6b94f1c6609d3facb2e0262ac37be97f1c3430eac661611ba9b3712c9c1809846e177b61f3fc2945f3770d475f70b81bea2aced'
+            
'5520594ddb2e73d75c6eb8476dc1984464306614d915627c0c9e69815a5671d65e286e90f3ee926daa040f9f24a81835eb5c7993e620a5b67aaaefa06571dcb2')
 
+prepare() {
+  cd HTTPretty-$pkgver
+  patch -p1 -i ../$pkgname-drop-mock.patch
+}
+
+build() {
+  cd HTTPretty-$pkgver
+  python setup.py build
+}
+
 check() {
   cd HTTPretty-$pkgver
-  nosetests3 -s tests
+  # https://github.com/gabrielfalcao/HTTPretty/issues/457
+  nosetests3 -s tests -e 
test_httpretty_should_handle_paths_starting_with_two_slashes
 }
 
-package_python-httpretty() {
+package() {
   cd HTTPretty-$pkgver
-  python3 setup.py install --root="$pkgdir" --optimize=1
-  install -Dm644 COPYING "$pkgdir"/usr/share/licenses/$pkgname/COPYING
+  python setup.py install --root="$pkgdir" --optimize=1
+  install -Dm644 COPYING -t "$pkgdir"/usr/share/licenses/$pkgname/
 }

Reply via email to