[arch-commits] Commit in (4 files)

Bruno Pagani archange at archlinux.org
Wed Dec 23 18:08:44 UTC 2020


    Date: Wednesday, December 23, 2020 @ 18:08:43
  Author: archange
Revision: 785040

Initial addition of pyxDamerauLevenshtein to [community]

Added:
  python-pyxdameraulevenshtein/
  python-pyxdameraulevenshtein/repos/
  python-pyxdameraulevenshtein/trunk/
  python-pyxdameraulevenshtein/trunk/PKGBUILD

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

Added: python-pyxdameraulevenshtein/trunk/PKGBUILD
===================================================================
--- python-pyxdameraulevenshtein/trunk/PKGBUILD	                        (rev 0)
+++ python-pyxdameraulevenshtein/trunk/PKGBUILD	2020-12-23 18:08:43 UTC (rev 785040)
@@ -0,0 +1,34 @@
+# Maintainer: Bruno Pagani <archange at archlinux.org>
+
+_pkg=pyxDamerauLevenshtein
+pkgname=python-${_pkg,,}
+pkgver=1.6.1
+pkgrel=1
+pkgdesc="Implements the Damerau-Levenshtein (DL) edit distance algorithm"
+arch=(x86_64)
+url="https://github.com/gfairchild/pyxDamerauLevenshtein"
+license=(BSD)
+depends=(python-numpy)
+makedepends=(python-setuptools cython)
+checkdepends=(python-pytest)
+# No tests in PyPi tarballs
+#source=(https://files.pythonhosted.org/packages/source/${_pkg::1}/${_pkg}/${_pkg}-${pkgver}.tar.gz)
+source=(${url}/archive/v${pkgver}/${_pkg}-${pkgver}.tar.gz)
+sha256sums=('26f843b0af9e04e538c7a2eda51ce9bcbd3f5723a1e5c6ff842fca11f5a08b27')
+
+build() {
+  cd ${_pkg}-${pkgver}
+  python setup.py build
+}
+
+check() {
+  cd ${_pkg}-${pkgver}
+  local python_version=$(python -c 'import sys; print(".".join(map(str, sys.version_info[:2])))')
+  PYTHONPATH="${PWD}"/build/lib.linux-${CARCH}-${python_version} pytest
+}
+
+package() {
+  cd ${_pkg}-${pkgver}
+  python setup.py install --prefix=/usr --root="${pkgdir}" --skip-build --optimize=1
+  install -Dm644 LICENSE.txt -t "${pkgdir}"/usr/share/licenses/${pkgname}
+}



More information about the arch-commits mailing list