aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLeo <thinkabit.ukim@gmail.com>2021-06-18 03:51:32 -0300
committerLeo <thinkabit.ukim@gmail.com>2021-06-18 08:00:08 -0300
commitb02980f876ab84dd40fdad50e47e819551d8cd00 (patch)
tree2521b4d63408d6b84a850ed29b890643250b8139
parent23a5b7884105ef1fe5646b70f26d07b183128f59 (diff)
downloadaports-b02980f876ab84dd40fdad50e47e819551d8cd00.tar.gz
aports-b02980f876ab84dd40fdad50e47e819551d8cd00.tar.bz2
aports-b02980f876ab84dd40fdad50e47e819551d8cd00.tar.xz
testing/py3-cachy: enable tests
use pyproject.toml and convert it with pyproject2setuppy
-rw-r--r--testing/py3-cachy/APKBUILD28
1 files changed, 22 insertions, 6 deletions
diff --git a/testing/py3-cachy/APKBUILD b/testing/py3-cachy/APKBUILD
index 7785430e22..897f7658f6 100644
--- a/testing/py3-cachy/APKBUILD
+++ b/testing/py3-cachy/APKBUILD
@@ -4,24 +4,40 @@
pkgname=py3-cachy
_realname=cachy
pkgver=0.3.0
-pkgrel=2
+pkgrel=3
pkgdesc="Simple yet effective caching library"
-options="!check" # No tests on pypi tarball, github uses pyproject.toml
url="https://github.com/sdispater/cachy"
arch="noarch"
license="MIT"
depends="python3"
-makedepends="py3-setuptools"
+makedepends="pyproject2setuppy"
+checkdepends="py3-pytest py3-flexmock py3-fakeredis"
source="https://files.pythonhosted.org/packages/source/${_realname:0:1}/$_realname/$_realname-$pkgver.tar.gz"
builddir="$srcdir/$_realname-$pkgver"
+prepare() {
+ default_prepare
+ cat <<- __EOF__ >> pyproject.toml
+
+ [build-system]
+ build-backend = "poetry.core.masonry.api"
+ __EOF__
+}
+
build() {
- python3 setup.py build
+ python3 -m pyproject2setuppy.main build
+}
+
+check() {
+ PYTHONPATH="$PWD/build/lib" py.test-3 -v \
+ --deselect tests/stores/test_memcached_store.py::RedisStoreTestCase
}
package() {
- python3 setup.py install --prefix=/usr --root="$pkgdir"
+ python3 -m pyproject2setuppy.main install --prefix=/usr --root="$pkgdir"
rm -rf "$pkgdir"/usr/lib/python3*/site-packages/tests
}
-sha512sums="0b69bd45ce81fc57710b44011965b8c4a313808f7c464a409b839d9206158f91b1e39a760d08d62bb5eb15e455ba9b89683f0eb42d2bfcc2e99b0b8f267e3ead cachy-0.3.0.tar.gz"
+sha512sums="
+0b69bd45ce81fc57710b44011965b8c4a313808f7c464a409b839d9206158f91b1e39a760d08d62bb5eb15e455ba9b89683f0eb42d2bfcc2e99b0b8f267e3ead cachy-0.3.0.tar.gz
+"