diff options
author | Luis Martinez | 2023-01-02 22:14:15 -0600 |
---|---|---|
committer | Luis Martinez | 2023-01-02 22:14:15 -0600 |
commit | 42ab60d769f703523bdcb64efc1429776d42943a (patch) | |
tree | 39565411f056642a9fbd245481f547cf406e71b2 | |
parent | 7a27e50cf39dba7cb29393a4e5c7c82735c590c8 (diff) | |
download | aur-42ab60d769f703523bdcb64efc1429776d42943a.tar.gz |
fix package
-rw-r--r-- | .SRCINFO | 14 | ||||
-rw-r--r-- | PKGBUILD | 82 |
2 files changed, 55 insertions, 41 deletions
@@ -1,22 +1,24 @@ pkgbase = python-thinc-git pkgdesc = Practical Machine Learning for NLP - pkgver = 8.0.14.dev0.r2.g7b54f728 + pkgver = 8.1.6.r2.g17fbcf43 pkgrel = 1 url = https://github.com/explosion/thinc arch = x86_64 arch = aarch64 license = MIT + makedepends = cython makedepends = git + makedepends = python-build + makedepends = python-installer makedepends = python-setuptools - makedepends = cython + makedepends = python-wheel depends = python-blis depends = python-catalogue depends = python-cymem - depends = python-hypothesis depends = python-mock depends = python-murmurhash depends = python-numpy - depends = python-pathlib + depends = python-packaging depends = python-plac depends = python-preshed depends = python-pydantic @@ -26,7 +28,7 @@ pkgbase = python-thinc-git depends = python-wasabi provides = python-thinc conflicts = python-thinc - source = git+https://github.com/explosion/thinc.git - b2sums = SKIP + source = python-thinc::git+https://github.com/explosion/thinc + sha256sums = SKIP pkgname = python-thinc-git @@ -1,52 +1,64 @@ -# Maintainer: Philip Goto <philip.goto@gmail.com> +# 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 -pkgver=8.0.14.dev0.r2.g7b54f728 +_pkgname="${pkgname%-git}" +_pkg="${_pkgname#python-}" +pkgver=8.1.6.r2.g17fbcf43 pkgrel=1 pkgdesc='Practical Machine Learning for NLP' -arch=(x86_64 aarch64) +arch=('x86_64' 'aarch64') url='https://github.com/explosion/thinc' -license=(MIT) +license=('MIT') depends=( - python-blis - python-catalogue - python-cymem - python-hypothesis - python-mock - python-murmurhash - python-numpy - python-pathlib - python-plac - python-preshed - python-pydantic - python-six - python-srsly - python-tqdm - python-wasabi -) + '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=( - git - python-setuptools - cython -) -provides=(python-thinc) -conflicts=(python-thinc) -source=("git+${url}.git") -b2sums=('SKIP') + 'cython' + 'git' + 'python-build' + 'python-installer' + 'python-setuptools' + 'python-wheel') +provides=("$_pkgname") +conflicts=("$_pkgname") +source=("$_pkgname::git+$url") +sha256sums=('SKIP') pkgver() { - cd thinc - git describe --long --tags | sed 's/^v//;s/\([^-]*-g\)/r\1/;s/-/./g' + 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() { - cd thinc - python setup.py build + ## dep checks fail with python-blis + cd "$_pkgname" + python -m build --wheel --no-isolation --skip-dependency-check } package() { - cd thinc - python setup.py install --skip-build --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/" + } |