blob: 0db23dd713712de6e762c47410d3c9c3a76d4b01 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
|
# 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
_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 "$_pkgname"
sed -i '18c\PACKAGES = find_packages(exclude=["thinc.tests*"])' setup.py
sed -i '5,6d' MANIFEST.in
}
build() {
## dep checks fail with python-blis
cd "$_pkgname"
python -m build --wheel --no-isolation --skip-dependency-check
}
package() {
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/"
}
|