summarylogtreecommitdiffstats
path: root/PKGBUILD
diff options
context:
space:
mode:
Diffstat (limited to 'PKGBUILD')
-rw-r--r--PKGBUILD96
1 files changed, 55 insertions, 41 deletions
diff --git a/PKGBUILD b/PKGBUILD
index a7d1e1c6432c..0db23dd71371 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,50 +1,64 @@
-# Maintainer: DanManN <dnahimov@gmail.com>
-# Python package author: Matthew Honnibal <matt@explosion.ai>
+# Maintainer: Luis Martinez <luis dot martinez at disroot dot org>
+# Contributor: Philip Goto <philip.goto@gmail.com>
+# Contributor: DanManN <dnahimov@gmail.com>
+
pkgname=python-thinc-git
-_origpkgname=thinc
-pkgver=6.12.1.r2400.a6badde8
-pkgrel=2
-pkgdesc="Practical Machine Learning for NLP"
-arch=("x86_64")
-url="https://github.com/explosion/thinc"
-license=("MIT")
-depends=('cython'
- 'python-numpy'
- 'python-murmurhash'
- 'python-cymem'
- 'python-preshed'
- 'python-wrapt'
- 'python-plac'
- 'python-tqdm'
- 'python-srsly'
- 'python-wasabi'
- 'python-six'
- 'python'
- 'python-hypothesis'
- 'python-pytest'
- 'python-mock'
- 'python-blis'
- 'flake8'
-)
-makedepends=('git' 'python-setuptools')
-optdepends=('python-spacy: examples')
-provides=('python-thinc')
-conflicts=('python-thinc')
-source=("git+https://github.com/explosion/$_origpkgname.git")
-md5sums=('SKIP')
+_pkgname="${pkgname%-git}"
+_pkg="${_pkgname#python-}"
+pkgver=8.1.6.r2.g17fbcf43
+pkgrel=1
+pkgdesc='Practical Machine Learning for NLP'
+arch=('x86_64' 'aarch64')
+url='https://github.com/explosion/thinc'
+license=('MIT')
+depends=(
+ 'python-blis'
+ 'python-catalogue'
+ 'python-cymem'
+ 'python-mock'
+ 'python-murmurhash'
+ 'python-numpy'
+ 'python-packaging'
+ 'python-plac'
+ 'python-preshed'
+ 'python-pydantic'
+ 'python-six'
+ 'python-srsly'
+ 'python-tqdm'
+ 'python-wasabi')
+makedepends=(
+ 'cython'
+ 'git'
+ 'python-build'
+ 'python-installer'
+ 'python-setuptools'
+ 'python-wheel')
+provides=("$_pkgname")
+conflicts=("$_pkgname")
+source=("$_pkgname::git+$url")
+sha256sums=('SKIP')
+
+pkgver() {
+ git -C "$_pkgname" describe --long --tags | sed 's/^v//;s/\([^-]*-g\)/r\1/;s/-/./g'
+}
prepare() {
- cd "$_origpkgname"
- git checkout $(curl https://api.github.com/repos/explosion/$_origpkgname/releases | grep tag_name | cut -d '"' -f4 | head -n 1)
+ cd "$_pkgname"
+ sed -i '18c\PACKAGES = find_packages(exclude=["thinc.tests*"])' setup.py
+ sed -i '5,6d' MANIFEST.in
}
-pkgver() {
- cd "$_origpkgname"
- printf "%s.r%s.%s" "$(cat thinc/about.py | grep -i version | grep -v '#' | cut -d "'" -f2 | head -n 1)" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
+build() {
+ ## dep checks fail with python-blis
+ cd "$_pkgname"
+ python -m build --wheel --no-isolation --skip-dependency-check
}
package() {
- cd "$_origpkgname"
- python setup.py install --root="${pkgdir}/" --optimize=1
- install -Dm644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
+ cd "$_pkgname"
+ python -m installer --destdir="$pkgdir" dist/*.whl
+ local _site="$(python -c 'import site; print(site.getsitepackages()[0])')"
+ install -dv "$pkgdir/usr/share/licenses/$pkgname/"
+ ln -sv "$_site/$_pkg-${pkgver/.r*/}.dist-info/LICENSE" "$pkgdir/usr/share/licenses/$pkgname/"
+
}