upgpkg: wordpress 6.2.1-1
[ArchLinux/community.git] / python-abydos / trunk / PKGBUILD
blobe227c29d9f61e41344e01488ee12e3275f444ee4
1 # Maintainer: Bruno Pagani <archange@archlinux.org>
3 _pkg=abydos
4 pkgname=python-${_pkg,,}
5 pkgver=0.5.0
6 pkgrel=5
7 pkgdesc="NLP/IR library for Python"
8 arch=(any)
9 url="https://github.com/chrislit/abydos"
10 license=(GPL3)
11 depends=(python-numpy)
12 makedepends=(python-setuptools)
13 checkdepends=(
14     python-pytest
15     python-deprecation
16     python-nltk
18 # No tests in PyPi tarballs
19 #source=(https://files.pythonhosted.org/packages/source/${_pkg::1}/${_pkg}/${_pkg}-${pkgver}.tar.gz)
20 source=(${url}/archive/v${pkgver}/${_pkg}-${pkgver}.tar.gz
21         python310.patch)
22 sha256sums=('0d46be1a40cfcdcd9ff9d052828c6ea57f5e1e2378373761c963c4a0cfcc5512'
23             '33d7c2d13f7e87c33c6f92caf934b6eb10b9503b1334068aee7b4de6bc2660e3')
25 prepare() {
26   cd ${_pkg}-${pkgver}
27   patch -Np1 -i ../python310.patch
28   find -name '*.py' -exec sed -e 's|from numpy import float |from numpy import float_ |g' \
29                               -e 's|numpy import int |numpy import int_ |g' \
30                               -e 's|dtype=np\.bool)|dtype=np.bool_)|g' \
31                               -e 's|dtype=np\.float)|dtype=np.float_)|g' -i {} \;
34 build() {
35   cd ${_pkg}-${pkgver}
36   python setup.py build
39 check() {
40   cd ${_pkg}-${pkgver}
41   rm setup.cfg
42   pytest
45 package() {
46   cd ${_pkg}-${pkgver}
47   python setup.py install --prefix=/usr --root="${pkgdir}" --skip-build --optimize=1