70 lines
1.5 KiB
Plaintext

# Contributor: Oleg Titov <oleg.titov@gmail.com>
# Maintainer: Oleg Titov <oleg.titov@gmail.com>
pkgname=py3-thinc
pkgver=8.2.1
pkgrel=0
pkgdesc="Practical Machine Learning for NLP"
url="https://github.com/explosion/thinc"
arch="x86_64 x86"
license="MIT"
depends="
py3-blis
py3-catalogue
py3-cymem
py3-murmurhash
py3-plac
py3-preshed
py3-srsly
py3-wasabi
python3
"
makedepends="
cython
py3-gpep517
py3-numpy-dev
py3-setuptools
py3-wheel
python3-dev
"
checkdepends="
py3-confection
py3-hypothesis
py3-mock
py3-numpy
py3-pytest
py3-pytest-xdist
py3-tqdm
"
subpackages="$pkgname-doc $pkgname-pyc"
source="thinc-$pkgver.tar.gz::https://github.com/explosion/thinc/archive/v$pkgver.tar.gz"
builddir="$srcdir/thinc-$pkgver"
build() {
CFLAGS="$CFLAGS -flto=auto" \
gpep517 build-wheel \
--wheel-dir .dist \
--output-fd 3 3>&1 >&2
}
check() {
python3 -m venv --clear --without-pip --system-site-packages .testenv
.testenv/bin/python3 -m installer .dist/*.whl
# hack around an import failure due to relative dirs
local installdir="$(echo $PWD/.testenv/lib/python3*/site-packages/)"
cd "$installdir"
../../../bin/python3 -m pytest thinc -n auto
}
package() {
python -m installer -d "$pkgdir" .dist/*.whl
install -Dm644 README.md -t "$pkgdir/usr/share/doc/$pkgname/"
rm -r "$pkgdir"/usr/lib/python3*/site-packages/thinc/tests/
}
sha512sums="
4f80c19833e7b6d118bd3e2c7c1dc740cd7ce41059a7a41d4af99300f98c205f1af8e0e7e1422d7eb6fc5c4fc154b1640632816b1fd5a48df7b1e3387bee0a36 thinc-8.2.1.tar.gz
"