aboutsummaryrefslogtreecommitdiffstats
path: root/community/py3-pdfminer/APKBUILD
diff options
context:
space:
mode:
Diffstat (limited to 'community/py3-pdfminer/APKBUILD')
-rw-r--r--community/py3-pdfminer/APKBUILD43
1 files changed, 32 insertions, 11 deletions
diff --git a/community/py3-pdfminer/APKBUILD b/community/py3-pdfminer/APKBUILD
index ea4f44c280c..dd354d075b2 100644
--- a/community/py3-pdfminer/APKBUILD
+++ b/community/py3-pdfminer/APKBUILD
@@ -1,7 +1,7 @@
# Maintainer: Carlo Landmeter <clandmeter@alpinelinux.org>
pkgname=py3-pdfminer
_pyname=pdfminer.six
-pkgver=20191020
+pkgver=20231228
pkgrel=1
pkgdesc="Python PDF Parser"
url="https://github.com/pdfminer/pdfminer.six"
@@ -9,25 +9,46 @@ arch="noarch"
license="MIT"
depends="
python3
- py3-chardet
- py3-sortedcontainers
- py3-six
- py3-pycryptodome
+ py3-charset-normalizer
+ py3-cryptography
"
makedepends="
+ py3-gpep517
py3-setuptools
+ py3-wheel
"
-_pypiprefix="${_pyname%${_pyname#?}}"
-source="https://files.pythonhosted.org/packages/source/$_pypiprefix/$_pyname/$_pyname-$pkgver.tar.gz"
+checkdepends="
+ py3-pytest
+ "
+# Only auto-generated github tarballs contain the testsuite
+subpackages="$pkgname-pyc"
+source="$pkgname-$pkgver.tar.gz::https://github.com/pdfminer/pdfminer.six/archive/$pkgver.tar.gz"
builddir="$srcdir/$_pyname-$pkgver"
-options="!check" # has no check
+
+prepare() {
+ default_prepare
+
+ sed -i "s|__VERSION__|$pkgver|" pdfminer/__init__.py
+}
build() {
- python3 setup.py build
+ gpep517 build-wheel \
+ --wheel-dir .dist \
+ --output-fd 3 3>&1 >&2
+}
+
+check() {
+ PYTHONPATH=build/lib:. \
+ python3 -m venv --clear --without-pip --system-site-packages .testenv
+ .testenv/bin/python3 -m installer .dist/*.whl
+ .testenv/bin/python3 -m pytest
}
package() {
- python3 setup.py install --prefix=/usr --root="$pkgdir"
+ python3 -m installer -d "$pkgdir" \
+ .dist/*.whl
}
-sha512sums="2fc999643fdf88aee5366d5676fbfe7dbcf231e5bc3e3fcdf0d8dbb0a2979fcb55a783e8f1d088e2a88004ff404dd1e49352a47d353d95f497adf8309a238ce2 pdfminer.six-20191020.tar.gz"
+sha512sums="
+8a1ddede842479c0afbdf4e0ac830efc290992dc2e2e4ed58aedcf6d2ef5662210ebbfad2bdd427099122c7f496257cf236abcfd7c6cb52e47bc12be82945523 py3-pdfminer-20231228.tar.gz
+"