Date: Friday, April 28, 2023 @ 08:48:44
  Author: felixonmars
Revision: 1449058

upgpkg: python-aiogram 2.22.2-2: rebuild with python 3.11

Modified:
  python-aiogram/trunk/PKGBUILD

----------+
 PKGBUILD |   23 ++++++++++++++++++-----
 1 file changed, 18 insertions(+), 5 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD    2023-04-28 08:43:31 UTC (rev 1449057)
+++ PKGBUILD    2023-04-28 08:48:44 UTC (rev 1449058)
@@ -3,7 +3,7 @@
 
 pkgname=python-aiogram
 pkgver=2.22.2
-pkgrel=1
+pkgrel=2
 pkgdesc="A pretty simple and fully asynchronous library for Telegram Bot API 
written with asyncio and aiohttp"
 arch=('any')
 url="https://github.com/aiogram/aiogram";
@@ -10,19 +10,32 @@
 license=('MIT')
 depends=('python-aiohttp' 'python-babel' 'python-certifi')
 makedepends=('python-setuptools')
-checkdepends=('python-aiohttp-socks' 'python-aioredis' 'python-aresponses' 
'python-pytest'
+checkdepends=('python-aiohttp-socks' 'python-redis' 'python-aresponses' 
'python-pytest'
               'python-pytest-lazy-fixture' 'pifpaf' 'redis')
 optdepends=('python-uvloop: fast, drop-in replacement of the built-in asyncio 
event loop'
             'python-ujson: ultra fast JSON encoder and decoder written in pure 
C'
             'python-rapidjson: extremely fast C++ JSON parser and 
serialization library'
             'python-emoji: emojize and demojize support'
-            'python-aioredis: Redis storage support'
+            'python-redis: Redis storage support'
             'python-aiohttp-socks: SOCKS4(a) and SOCKS5 proxy support'
 #            'python-rethinkdb: RethinkDB storage support'  # No such package 
yet
 )
-source=("$url/archive/v$pkgver/$pkgname-$pkgver.tar.gz")
-sha512sums=('7cbc979acba4904e503c801c4a823f802a3daf048bc5433e7cf9cb101e6a77f69955f363a73c5559901fa2b674f5092ec8c6336977807feac087581ef35fe5e0')
+source=("https://github.com/aiogram/aiogram/archive/v$pkgver/$pkgname-$pkgver.tar.gz";
+        
$pkgname-replace-aioredis.patch::https://github.com/aiogram/aiogram/pull/1074.patch)
+sha512sums=('7cbc979acba4904e503c801c4a823f802a3daf048bc5433e7cf9cb101e6a77f69955f363a73c5559901fa2b674f5092ec8c6336977807feac087581ef35fe5e0'
+            
'28eb2d80dd5f530c76c49acd46f583563c8facdeea620ee697b45defc53a2b1e52ef48da5c6543b4619c30e5e083e398906afa091414006c2311e40e7cb2e929')
 
+prepare() {
+  cd aiogram-$pkgver
+  patch -p1 -i ../$pkgname-replace-aioredis.patch
+  sed -i -e 's/import aioredis$/import redis.asyncio/' \
+         -e 's/aioredis.__version__/"2"/' \
+         -e 
's/aioredis.connection.parse_url/redis.asyncio.connection.parse_url/' \
+         tests/conftest.py
+  # only for aioredis <2
+  rm tests/test_contrib/test_fsm_storage/test_storage.py
+}
+
 build() {
   cd aiogram-$pkgver
   python setup.py build

Reply via email to