Date: Saturday, April 8, 2023 @ 21:54:11
  Author: dvzrv
Revision: 1442990

upgpkg: python-fire 0.5.0-2: Rebuild against Python 3.11.

Apply upstreamed patch for Python 3.11 compat: 
https://github.com/google/python-fire/issues/427

Added:
  python-fire/trunk/python-fire-0.5.0-python3.11.patch
Modified:
  python-fire/trunk/PKGBUILD

------------------------------------+
 PKGBUILD                           |   38 ++++++++++++++++++++++++++++-------
 python-fire-0.5.0-python3.11.patch |   23 +++++++++++++++++++++
 2 files changed, 54 insertions(+), 7 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD    2023-04-08 21:54:06 UTC (rev 1442989)
+++ PKGBUILD    2023-04-08 21:54:11 UTC (rev 1442990)
@@ -3,18 +3,42 @@
 _name=fire
 pkgname=python-fire
 pkgver=0.5.0
-pkgrel=1
+pkgrel=2
 pkgdesc="A library for automatically generating command line interfaces"
 arch=(any)
 url="https://github.com/google/python-fire";
 license=(Apache)
-depends=(python-six python-termcolor)
-makedepends=(python-build python-installer python-setuptools python-wheel)
-checkdepends=(python-hypothesis python-levenshtein python-mock python-pytest)
-source=(https://files.pythonhosted.org/packages/source/${_name::1}/$_name/$_name-$pkgver.tar.gz)
-sha256sums=('a6b0d49e98c8963910021f92bba66f65ab440da2982b78eb1bbf95a0a34aacc6')
-b2sums=('eecaceb95faba05a0f2b157560f690d9cee0a10939c2f376b8563955171299ada4b522775450443d9ff9ad31092cf4967a7fc77f7cd1eaab30c9450291a9dbeb')
+depends=(
+  python
+  python-six
+  python-termcolor
+)
+makedepends=(
+  python-build
+  python-installer
+  python-setuptools
+  python-wheel
+)
+checkdepends=(
+  python-hypothesis
+  python-levenshtein
+  python-mock
+  python-pytest
+)
+source=(
+  
https://files.pythonhosted.org/packages/source/${_name::1}/$_name/$_name-$pkgver.tar.gz
+  $pkgname-0.5.0-python3.11.patch
+)
+sha256sums=('a6b0d49e98c8963910021f92bba66f65ab440da2982b78eb1bbf95a0a34aacc6'
+            '5067d7dadb4ebc8e47dfc8080c3551d7efe9411e49c49275cdbdedf8d872fedd')
+b2sums=('eecaceb95faba05a0f2b157560f690d9cee0a10939c2f376b8563955171299ada4b522775450443d9ff9ad31092cf4967a7fc77f7cd1eaab30c9450291a9dbeb'
+        
'4a75b46429cfad6b7c55e2fb36df10875f3950858c55112c120d269f7c72d717b3c12d99d61ed15d3ec345195503cc34f42e4481e121314cac364eee72509489')
 
+prepare() {
+  # fix for python >= 3.11: https://github.com/google/python-fire/issues/427
+  patch -Np1 -d $_name-$pkgver -i ../$pkgname-0.5.0-python3.11.patch
+}
+
 build() {
   cd $_name-$pkgver
   python -m build --wheel --no-isolation

Added: python-fire-0.5.0-python3.11.patch
===================================================================
--- python-fire-0.5.0-python3.11.patch                          (rev 0)
+++ python-fire-0.5.0-python3.11.patch  2023-04-08 21:54:11 UTC (rev 1442990)
@@ -0,0 +1,23 @@
+From 30b775a7b36ce7fbc04656c7eec4809f99d3e178 Mon Sep 17 00:00:00 2001
+From: Hai Zhu <[email protected]>
+Date: Tue, 28 Feb 2023 02:52:28 +0000
+Subject: [PATCH] remove asyncio.coroutine
+
+---
+ fire/test_components_py3.py | 3 +--
+ 1 file changed, 1 insertion(+), 2 deletions(-)
+
+diff --git a/fire/test_components_py3.py b/fire/test_components_py3.py
+index 5140921d..17fb932c 100644
+--- a/fire/test_components_py3.py
++++ b/fire/test_components_py3.py
+@@ -57,8 +57,7 @@ def lru_cache_decorated(arg1):
+ 
+ class WithAsyncio(object):
+ 
+-  @asyncio.coroutine
+-  def double(self, count=0):
++  async def double(self, count=0):
+     return 2 * count
+ 
+ 

Reply via email to