Date: Sunday, April 2, 2023 @ 14:55:04
  Author: dvzrv
Revision: 1434192

archrelease: copy trunk to community-x86_64

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

----------+
 PKGBUILD |   78 ++++++++++++++++++++++++++++++++++---------------------------
 1 file changed, 44 insertions(+), 34 deletions(-)

Deleted: PKGBUILD
===================================================================
--- PKGBUILD    2023-04-02 14:54:48 UTC (rev 1434191)
+++ PKGBUILD    2023-04-02 14:55:04 UTC (rev 1434192)
@@ -1,34 +0,0 @@
-# Maintainer: David Runge <[email protected]>
-
-_name=crcmod
-pkgname=python-crcmod
-pkgver=1.7
-pkgrel=4
-pkgdesc="Module for generating objects that compute the Cyclic Redundancy 
Check (CRC)"
-arch=(x86_64)
-url="http://crcmod.sourceforge.net/";
-license=(MIT)
-depends=(python)
-makedepends=(python-setuptools)
-source=("https://files.pythonhosted.org/packages/source/${_name::1}/${_name}/${_name}-${pkgver}.tar.gz";)
-sha512sums=('3c2f65004761c84f19d6ba95a0af74512108bad5007d9e20f8e684822e4196ce17073e58b47d2fa997e058e3d82782f3393458b6f0e86935418f38877d319a31')
-b2sums=('542bdde18f4565f574a2746de5e1fcb10d015d5c89f3eba7a0c316a3e53eb5a895664e2f51e54dcbab7d2ee6f30055137f22498f44b6c27d40d0692ff9652813')
-
-build() {
-  cd "$_name-$pkgver"
-  python setup.py build
-}
-
-check() {
-  local _pyver=$(python -c 'import sys; print(".".join(map(str, 
sys.version_info[:2])))')
-
-  cd "$_name-$pkgver"
-  export PYTHONPATH="build/lib.linux-${CARCH}-${_pyver}/:${PYTHONPATH}"
-  python test/test_crcmod.py
-}
-
-package() {
-  cd "$_name-$pkgver"
-  python setup.py install --optimize=1 --root="${pkgdir}"
-  install -vDm 644 LICENSE -t "${pkgdir}/usr/share/licenses/${pkgname}"
-}

Copied: python-crcmod/repos/community-x86_64/PKGBUILD (from rev 1434191, 
python-crcmod/trunk/PKGBUILD)
===================================================================
--- PKGBUILD                            (rev 0)
+++ PKGBUILD    2023-04-02 14:55:04 UTC (rev 1434192)
@@ -0,0 +1,44 @@
+# Maintainer: David Runge <[email protected]>
+
+_name=crcmod
+pkgname=python-crcmod
+pkgver=1.7
+pkgrel=5
+pkgdesc="Module for generating objects that compute the Cyclic Redundancy 
Check (CRC)"
+arch=(x86_64)
+url="http://crcmod.sourceforge.net/";
+license=(MIT)
+depends=(
+  glibc
+  python
+)
+makedepends=(
+  python-build
+  python-installer
+  python-setuptools
+  python-wheel
+)
+source=(https://files.pythonhosted.org/packages/source/${_name::1}/$_name/$_name-$pkgver.tar.gz)
+sha512sums=('3c2f65004761c84f19d6ba95a0af74512108bad5007d9e20f8e684822e4196ce17073e58b47d2fa997e058e3d82782f3393458b6f0e86935418f38877d319a31')
+b2sums=('542bdde18f4565f574a2746de5e1fcb10d015d5c89f3eba7a0c316a3e53eb5a895664e2f51e54dcbab7d2ee6f30055137f22498f44b6c27d40d0692ff9652813')
+
+build() {
+  cd $_name-$pkgver
+  python -m build --wheel --no-isolation
+}
+
+check() {
+  local site_packages=$(python -c "import site; 
print(site.getsitepackages()[0])")
+
+  cd $_name-$pkgver
+  # install to temporary location, as importlib is used
+  python -m installer --destdir=test_dir dist/*.whl
+  export PYTHONPATH="test_dir/$site_packages:$PYTHONPATH"
+  python test/test_crcmod.py
+}
+
+package() {
+  cd "$_name-$pkgver"
+  python -m installer --destdir="$pkgdir" dist/*.whl
+  install -vDm 644 LICENSE -t "$pkgdir/usr/share/licenses/$pkgname/"
+}

Reply via email to