From 667ff3d752139f0ca707856c362b2813d85b0d8a Mon Sep 17 00:00:00 2001 From: Bart Ribbers Date: Thu, 14 Dec 2023 10:04:46 +0100 Subject: [PATCH] community/py3-timezonefinder: upgrade to 6.2.0 --- community/py3-timezonefinder/APKBUILD | 38 ++++++++++++++++++++------- 1 file changed, 28 insertions(+), 10 deletions(-) diff --git a/community/py3-timezonefinder/APKBUILD b/community/py3-timezonefinder/APKBUILD index 154523606d8..355eb5e433f 100644 --- a/community/py3-timezonefinder/APKBUILD +++ b/community/py3-timezonefinder/APKBUILD @@ -1,35 +1,53 @@ # Contributor: Bart Ribbers # Maintainer: Bart Ribbers pkgname=py3-timezonefinder -pkgver=5.2.0 -pkgrel=3 +pkgver=6.2.0 +pkgrel=0 pkgdesc="Fast python package for finding the timezone of any point on earth (coordinates) offline" url="https://github.com/jannikmi/timezonefinder" -arch="noarch" +# x86 and armhf blocked by test failures +arch="all !x86 !armhf" license="MIT" depends=" + py3-h3 py3-numpy - python3 " -makedepends="py3-setuptools" +makedepends=" + py3-cffi + py3-gpep517 + py3-poetry-core + py3-setuptools + py3-wheel + python3-dev + " checkdepends=" py3-pytest py3-pytest-cov " subpackages="$pkgname-pyc" -source="https://pypi.python.org/packages/source/t/timezonefinder/timezonefinder-$pkgver.tar.gz" +source="$pkgname-$pkgver.tar.gz::https://github.com/jannikmi/timezonefinder/archive/refs/tags/$pkgver.tar.gz" builddir="$srcdir/timezonefinder-$pkgver" build() { - python3 setup.py build + gpep517 build-wheel \ + --wheel-dir .dist \ + --output-fd 3 3>&1 >&2 } check() { - PYTHONPATH="$PWD/build/lib" pytest + python3 -m venv --clear --without-pip --system-site-packages .testenv + .testenv/bin/python3 -m installer .dist/*.whl + + # Tests require "timezonefinder" to be present in the path" + export PATH="$PATH:$PWD/.testenv/bin" + .testenv/bin/python3 -m pytest -k "not test_inside_polygon" } package() { - python3 setup.py install --skip-build --root="$pkgdir" + python3 -m installer -d "$pkgdir" \ + .dist/*.whl } -sha512sums="94da76328aa95d72c886c5b3e8a07d9044c032c500bbc3d88f6739f463e32a66a9246f988c4123e3ebc446b543f3ca1270b18d22d90569b4945dc478f02cad48 timezonefinder-5.2.0.tar.gz" +sha512sums=" +38d36e6c117ed55d7cea1cccc954e4b721a17f9914108cf4d1d204c8d0a101913837cef7a1fe1f1c1a918119babcff231a1f5040e01c6dd89f958bdcfc549fb4 py3-timezonefinder-6.2.0.tar.gz +"