Date: Tuesday, January 24, 2023 @ 22:29:17
  Author: dbermond
Revision: 1388173

upgpkg: python-lmdb 1.4.0-1

Modified:
  python-lmdb/trunk/PKGBUILD

----------+
 PKGBUILD |   20 ++++++++++++--------
 1 file changed, 12 insertions(+), 8 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD    2023-01-24 22:28:52 UTC (rev 1388172)
+++ PKGBUILD    2023-01-24 22:29:17 UTC (rev 1388173)
@@ -3,7 +3,7 @@
 
 _pkg=py-lmdb
 pkgname=python-lmdb
-pkgver=1.3.0
+pkgver=1.4.0
 pkgrel=1
 pkgdesc="Universal Python binding for the LMDB Lightning Database"
 arch=(x86_64)
@@ -10,25 +10,29 @@
 url="https://github.com/jnwatson/py-lmdb/";
 license=('custom: OpenLDAP')
 depends=(python python-cffi lmdb)
-makedepends=(python-setuptools)
+makedepends=(python-build python-installer python-setuptools python-wheel)
 checkdepends=(python-pytest)
 source=(${url}/archive/${_pkg}_${pkgver}.tar.gz)
-sha256sums=('d7eb6c3045f86ed426bfc5237530ea4acefbcbfaa833a19f1731662ab1f49cdc')
+sha256sums=('510df2fc5afe53d7706a6f3ff3e0a65aeb6d9c7d2d3ca642609aa3d0b88ee238')
 
 build() {
   cd ${_pkg}-${_pkg}_${pkgver}
-  LMDB_FORCE_SYSTEM=1 python setup.py build
+  LMDB_FORCE_SYSTEM=1 python -m build --wheel --no-isolation
 }
 
 check() {
   cd ${_pkg}-${_pkg}_${pkgver}
   local _pyver
-  _pyver="$(python -c 'import sys; print("%s.%s" %sys.version_info[0:2])')"
-  LMDB_FORCE_SYSTEM=1 PYTHONPATH="${PWD}"/build/lib.linux-${CARCH}-${_pyver} 
pytest -vv --color=yes
+  _pyver="$(python -c 'import sys; print("".join(map(str, 
sys.version_info[:2])))')"
+  LMDB_FORCE_SYSTEM=1 
PYTHONPATH="${PWD}"/build/lib.linux-$CARCH-cpython-${_pyver} pytest -vv 
--color=yes
 }
 
 package() {
   cd ${_pkg}-${_pkg}_${pkgver}
-  LMDB_FORCE_SYSTEM=1 python setup.py install --root="$pkgdir" --skip-build 
--optimize=1
-  install -Dm644 LICENSE -t "${pkgdir}"/usr/share/licenses/${pkgname}
+  local _pyver
+  _pyver="$(python -c 'import sys; print("%s.%s" %sys.version_info[0:2])')"
+  LMDB_FORCE_SYSTEM=1 python -m installer --destdir="$pkgdir" dist/*.whl
+  install -d -m755 "${pkgdir}"/usr/share/licenses/${pkgname}
+  ln -s 
../../../lib/python${_pyver}/site-packages/lmdb-${pkgver}.dist-info/LICENSE \
+    "${pkgdir}"/usr/share/licenses/${pkgname}/LICENSE
 }

Reply via email to