From 236ace23b4e0e500ca17a628bc0315e342bb319f Mon Sep 17 00:00:00 2001 From: Bart Ribbers Date: Sat, 28 Jan 2023 23:47:00 +0100 Subject: [PATCH] testing/py3-fire: new aport --- .../py3-fire/0001-Fix-Python3.11-tests.patch | 16 ++++++ testing/py3-fire/APKBUILD | 56 +++++++++++++++++++ 2 files changed, 72 insertions(+) create mode 100644 testing/py3-fire/0001-Fix-Python3.11-tests.patch create mode 100644 testing/py3-fire/APKBUILD diff --git a/testing/py3-fire/0001-Fix-Python3.11-tests.patch b/testing/py3-fire/0001-Fix-Python3.11-tests.patch new file mode 100644 index 00000000000..3943431e240 --- /dev/null +++ b/testing/py3-fire/0001-Fix-Python3.11-tests.patch @@ -0,0 +1,16 @@ +diff --git a/fire/test_components_py3.py b/fire/test_components_py3.py +index 5140921..9c76ca5 100644 +--- a/fire/test_components_py3.py ++++ b/fire/test_components_py3.py +@@ -56,9 +56,8 @@ def lru_cache_decorated(arg1): + + + class WithAsyncio(object): +- +- @asyncio.coroutine +- def double(self, count=0): ++ ++ async def double(self, count=0): + return 2 * count + + diff --git a/testing/py3-fire/APKBUILD b/testing/py3-fire/APKBUILD new file mode 100644 index 00000000000..ac924f3daa8 --- /dev/null +++ b/testing/py3-fire/APKBUILD @@ -0,0 +1,56 @@ +# Contributor: Bart Ribbers +# Maintainer: Bart Ribbers +pkgname=py3-fire +pkgver=0.5.0 +pkgrel=0 +pkgdesc="A library for automatically generating command line interfaces" +url="https://github.com/google/python-fire" +arch="noarch" +license="Apache-2.0" +depends=" + py3-six + py3-termcolor + python3 + " +makedepends=" + py3-gpep517 + py3-installer + py3-setuptools + py3-wheel + " +checkdepends=" + py3-pytest-asyncio + py3-hypothesis + py3-mock + py3-pytest + " +source="https://pypi.python.org/packages/source/f/fire/fire-$pkgver.tar.gz + 0001-Fix-Python3.11-tests.patch + " +builddir="$srcdir/fire-$pkgver" + +build() { + gpep517 build-wheel \ + --wheel-dir dist \ + --output-fd 3 3>&1 >&2 +} + +check() { + python3 -m venv --clear --without-pip --system-site-packages testenv + testenv/bin/python3 -m installer dist/*.whl + + case "$CARCH" in + armv7) testenv/bin/python3 -m unittest discover -k 'not test_fuzz_parse' ;; + *) testenv/bin/python3 -m unittest discover ;; + esac +} + +package() { + python3 -m installer -d "$pkgdir" \ + dist/*.whl +} + +sha512sums=" +645a9973e27a42aab58b0c045c5ceaa087c9f27b854d870addc4dbf697a0d6f633bf7754a6c07761a965433fe6f1a701b62408d17b590bb5233d99d7fbab0ecf fire-0.5.0.tar.gz +9fcd97304a7c616879bf8d55cd77f5f54076e6e14c50c86bbe888b55a54b169dd5f984a30969edf1fe0a62a32fadce767d3597b684d37984c868a0bfcb01426c 0001-Fix-Python3.11-tests.patch +"