1 # Maintainer: Daniel Bermond <dbermond@archlinux.org>
2 # Maintainer: Bruno Pagani <archange@archlinux.org>
8 pkgdesc="Universal Python binding for the LMDB Lightning Database"
10 url="https://github.com/jnwatson/py-lmdb/"
11 license=('custom: OpenLDAP')
12 depends=(python python-cffi lmdb)
13 makedepends=(python-build python-installer python-setuptools python-wheel)
14 checkdepends=(python-pytest)
15 source=(${url}/archive/${_pkg}_${pkgver}.tar.gz)
16 sha256sums=('c574035dd85ef7f5b1d6d9c9f639fcaff51fcf85a397c5b6d721e161e6077f51')
19 cd ${_pkg}-${_pkg}_${pkgver}
20 LMDB_FORCE_SYSTEM=1 python -m build --wheel --no-isolation
24 cd ${_pkg}-${_pkg}_${pkgver}
26 _pyver="$(python -c 'import sys; print("".join(map(str, sys.version_info[:2])))')"
27 LMDB_FORCE_SYSTEM=1 PYTHONPATH="${PWD}"/build/lib.linux-$CARCH-cpython-${_pyver} pytest -vv --color=yes
31 cd ${_pkg}-${_pkg}_${pkgver}
33 _pyver="$(python -c 'import sys; print("%s.%s" %sys.version_info[0:2])')"
34 LMDB_FORCE_SYSTEM=1 python -m installer --destdir="$pkgdir" dist/*.whl
35 install -d -m755 "${pkgdir}"/usr/share/licenses/${pkgname}
36 ln -s ../../../lib/python${_pyver}/site-packages/lmdb-${pkgver}.dist-info/LICENSE \
37 "${pkgdir}"/usr/share/licenses/${pkgname}/LICENSE