Date: Thursday, April 6, 2023 @ 17:09:57
Author: felixonmars
Revision: 1439907
archrelease: copy trunk to community-staging-x86_64
Added:
python-pycares/repos/community-staging-x86_64/
python-pycares/repos/community-staging-x86_64/PKGBUILD
(from rev 1439906, python-pycares/trunk/PKGBUILD)
----------+
PKGBUILD | 42 ++++++++++++++++++++++++++++++++++++++++++
1 file changed, 42 insertions(+)
Copied: python-pycares/repos/community-staging-x86_64/PKGBUILD (from rev
1439906, python-pycares/trunk/PKGBUILD)
===================================================================
--- community-staging-x86_64/PKGBUILD (rev 0)
+++ community-staging-x86_64/PKGBUILD 2023-04-06 17:09:57 UTC (rev 1439907)
@@ -0,0 +1,42 @@
+# Maintainer: Daniel M. Capella <[email protected]>
+
+_name=pycares
+pkgname=python-pycares
+pkgver=4.3.0
+pkgrel=2
+pkgdesc='Python interface for c-ares'
+arch=('x86_64')
+url=https://github.com/saghul/pycares
+license=('MIT')
+depends=('c-ares' 'python-cffi')
+makedepends=('python-build' 'python-installer' 'python-setuptools'
+ 'python-wheel')
+checkdepends=('python-idna')
+optdepends=('python-idna')
+source=("https://files.pythonhosted.org/packages/source/${_name::1}/$_name/$_name-$pkgver.tar.gz")
+sha256sums=('c542696f6dac978e9d99192384745a65f80a7d9450501151e4a7563e06010d45')
+b2sums=('a69d8c4bd43a9317dca626092e99a4eeca3f3163fefc0946c20cd5177e6213a1300625d636fba04d99b16b4d5e122b86f4b82b41413823a1826713bcc459c9f4')
+
+build() {
+ cd $_name-$pkgver
+ PYCARES_USE_SYSTEM_LIB=1 python -m build --wheel --skip-dependency-check
--no-isolation
+}
+
+# Test failures: gethostbyaddr{,6}, test_getnameinfo
+#check() {
+# cd $_name-$pkgver
+# python -m venv --system-site-packages test-env
+# test-env/bin/python -m installer dist/*.whl
+# PATH="$PWD/test-env/bin:$PATH" test-env/bin/python tests/tests.py
+#}
+
+package() {
+ cd $_name-$pkgver
+ 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"/$_name-$pkgver.dist-info/LICENSE \
+ "$pkgdir"/usr/share/licenses/$pkgname/LICENSE
+}