summaryrefslogtreecommitdiff
path: root/pcr
diff options
context:
space:
mode:
authorLuke T. Shumaker <lukeshu@parabola.nu>2024-01-08 09:58:47 -0700
committerLuke T. Shumaker <lukeshu@parabola.nu>2024-01-08 10:31:43 -0700
commit2d87219c0bdb473e079862fac98f7563088b8e55 (patch)
tree02de2367c4b680bf657213ca2665faef082013a8 /pcr
parent49ff6428650cd63580e6499533c3f5d08f8893ed (diff)
pcr/python-py3dns: udgpkg 3.2.1→4.0.0
This is a "major-version-bump" breaking change in that it dropped the `DnsAsyncRequest` class, which is broken in Python 3.12, which dropped `asynccore`. Anything that needed `DnsAsyncRequest` also needed `asynccore` and so needs adjusted for new Python anyway.
Diffstat (limited to 'pcr')
-rw-r--r--pcr/python-py3dns/PKGBUILD37
1 files changed, 30 insertions, 7 deletions
diff --git a/pcr/python-py3dns/PKGBUILD b/pcr/python-py3dns/PKGBUILD
index e04625965..e688b8898 100644
--- a/pcr/python-py3dns/PKGBUILD
+++ b/pcr/python-py3dns/PKGBUILD
@@ -4,23 +4,41 @@
pkgname=python-py3dns
_pkgname=${pkgname#python-}
-pkgver=3.2.1
-pkgrel=3
+pkgver=4.0.0
+pkgrel=1
pkgdesc="A module for looking up DNS entries in Python applications"
arch=('any')
url="https://launchpad.net/${_pkgname}"
license=('custom:PSF-like')
-makedepends=('python-setuptools')
+makedepends=('python-build' 'python-installer' 'python-wheel' 'python-flit')
source=("https://launchpad.net/${_pkgname}/trunk/${pkgver}/+download/${_pkgname}-${pkgver}.tar.gz"{,.asc})
-md5sums=('35a441081a1acfa0cf78e7ccc2ff9449'
+md5sums=('1dddc2621ced329a84a814eae1f92a39'
'SKIP')
validpgpkeys=('E7729BFFBE85400FEEEE23B178D7DEFB9AD59AF1') # Donald Scott Kitterman
build() {
cd "$_pkgname-$pkgver"
- python setup.py build
+ python -m build --wheel --no-isolation
+}
+
+check() {
+ if ! getent hosts parabola.nu >/dev/null; then
+ # The tests require networking, which is disabled in libremakepkg
+ # (for good reason). But it's a bummer for these tests.
+ # https://labs.parabola.nu/issues/3565
+ return
+ fi
+
+ cd "$_pkgname-$pkgver"
+ for tstfile in ./test.py tests/*; do
+ echo "Running $tstfile..."
+ case "$tstfile" in
+ tests/test5.py) PYTHONPATH=. "$tstfile" parabola.nu;;
+ *) PYTHONPATH=. "$tstfile";;
+ esac
+ done
}
package() {
@@ -28,6 +46,11 @@ package() {
depends=("python>=${_python_version}" "python<${_python_version%.*}.$(( ${_python_version##*.} + 1 ))")
cd "$_pkgname-$pkgver"
- python setup.py install --root="$pkgdir/" --optimize=1
- install -Dm644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
+ python -m installer --destdir="$pkgdir" dist/*.whl
+
+ # Symlink license file
+ local site_packages=$(python -c "import site; print(site.getsitepackages()[0])")
+ install -d "$pkgdir/usr/share/licenses/$pkgname"
+ ln -s "$site_packages/${pkgname#python-}-$pkgver.dist-info/licenses/LICENSE" \
+ "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
}