[arch-commits] Commit in python-pycares/repos/community-x86_64 (PKGBUILD PKGBUILD)

Daniel M. Capella polyzen at gemini.archlinux.org
Wed Aug 10 17:17:14 UTC 2022


    Date: Wednesday, August 10, 2022 @ 17:17:14
  Author: polyzen
Revision: 1265058

archrelease: copy trunk to community-x86_64

Added:
  python-pycares/repos/community-x86_64/PKGBUILD
    (from rev 1265057, python-pycares/trunk/PKGBUILD)
Deleted:
  python-pycares/repos/community-x86_64/PKGBUILD

----------+
 PKGBUILD |   80 ++++++++++++++++++++++++++++++++-----------------------------
 1 file changed, 42 insertions(+), 38 deletions(-)

Deleted: PKGBUILD
===================================================================
--- PKGBUILD	2022-08-10 17:16:51 UTC (rev 1265057)
+++ PKGBUILD	2022-08-10 17:17:14 UTC (rev 1265058)
@@ -1,38 +0,0 @@
-# Maintainer: Daniel M. Capella <polyzen at archlinux.org>
-
-pkgname=python-pycares
-pkgver=4.2.1
-pkgrel=1
-pkgdesc='Python interface for c-ares'
-arch=('x86_64')
-url=https://github.com/saghul/pycares
-license=('MIT')
-depends=('c-ares' 'python-cffi')
-makedepends=('python-setuptools')
-checkdepends=('python-idna')
-optdepends=('python-idna')
-source=("https://files.pythonhosted.org/packages/source/p/pycares/pycares-$pkgver.tar.gz")
-sha256sums=('735b4f75fd0f595c4e9184da18cd87737f46bc81a64ea41f4edce2b6b68d46d2')
-b2sums=('62caa1d40c936354aaa519ec5214f31f6ccf69724624d443c76d036e9c5c7a260854d203c66b718ef2c3ba82ad280079f46e969e12443800ce11d8f273e7ba56')
-
-build() {
-  cd pycares-$pkgver
-  PYCARES_USE_SYSTEM_LIB=1 python setup.py build
-}
-
-# Test failures: test_custom_resolvconf, gethostbyaddr{,6}, test_getnameinfo
-#check() {
-#  cd pycares-$pkgver
-#  mkdir -p temp
-#  local site_packages=$(python -c "import site; print(site.getsitepackages()[0])")
-#  python setup.py install --root=temp --optimize=1 --skip-build
-#  PATH="$PWD/temp/usr/bin:$PATH" PYTHONPATH="$PWD/temp/$site_packages" python tests/tests.py
-#}
-
-package() {
-  cd pycares-$pkgver
-  python setup.py install --root="$pkgdir" --optimize=1 --skip-build
-  install -Dm644 -t "$pkgdir"/usr/share/licenses/$pkgname LICENSE
-}
-
-# vim:set ts=2 sw=2 et:

Copied: python-pycares/repos/community-x86_64/PKGBUILD (from rev 1265057, python-pycares/trunk/PKGBUILD)
===================================================================
--- PKGBUILD	                        (rev 0)
+++ PKGBUILD	2022-08-10 17:17:14 UTC (rev 1265058)
@@ -0,0 +1,42 @@
+# Maintainer: Daniel M. Capella <polyzen at archlinux.org>
+
+_name=pycares
+pkgname=python-pycares
+pkgver=4.2.2
+pkgrel=1
+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=('e1f57a8004370080694bd6fb969a1ffc9171a59c6824d54f791c1b2e4d298385')
+b2sums=('c5f0f3a3195f2b91ebcfbac5811a3c2959d502c9063ee29a1e1f73a70e32ec3ba25512856c4e810924fa14c1d3b9ebb1e15a9eea71627cd00e2e6c037ae672c1')
+
+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
+}



More information about the arch-commits mailing list