mirror of
https://gitlab.alpinelinux.org/alpine/aports.git
synced 2025-07-24 19:55:26 +03:00
69 lines
1.5 KiB
Text
69 lines
1.5 KiB
Text
# Contributor: Oleg Titov <oleg.titov@gmail.com>
|
|
# Maintainer: Oleg Titov <oleg.titov@gmail.com>
|
|
pkgname=py3-thinc
|
|
pkgver=8.1.9
|
|
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"
|
|
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="
|
|
745d5e5f87f84d41133bf51cadeb4d16cf57b6573de765279efc080e8aadcdb19cbec6b4d19745ce46b13d794ea61fcdda64a916cc71834669ca053d37cb26cb thinc-8.1.9.tar.gz
|
|
"
|