diff options
author | Luis Martinez | 2022-08-17 14:20:09 -0500 |
---|---|---|
committer | Luis Martinez | 2022-08-17 14:20:09 -0500 |
commit | 5c0da86e4080384fd5ac385e47ebd28f2b90ba28 (patch) | |
tree | a20ffbd1723e9d77b7e8fea5637b79c26c0e5c3b /PKGBUILD | |
parent | c77f233d62008cbc36d821b5217842e5231efaf8 (diff) | |
download | aur-5c0da86e4080384fd5ac385e47ebd28f2b90ba28.tar.gz |
packaging cleanup
Diffstat (limited to 'PKGBUILD')
-rw-r--r-- | PKGBUILD | 81 |
1 files changed, 43 insertions, 38 deletions
@@ -1,51 +1,56 @@ -# 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: Chris Brendel <cdbrendel@gmail.com> -_pkgname=thinc -pkgname=python-${_pkgname} +pkgname=python-thinc +_pkg="${pkgname#python-}" pkgver=8.1.0 -pkgrel=1 +pkgrel=2 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-plac - python-preshed - python-pydantic - python-six - python-srsly - python-tqdm - python-wasabi -) -makedepends=( - python-build - python-installer - python-wheel - cython -) -source=("https://files.pythonhosted.org/packages/source/${_pkgname::1}/${_pkgname}/${_pkgname}-${pkgver}.tar.gz") -b2sums=('a816b977a1ae6ec1bd69c6bf4f23f1aad8767b1947daf0f402af593607b6b37c586f487149aa3ee110b214d31d093387806698b5e2dfd1bc828c2adf25e73d96') + 'python-blis' + 'python-catalogue' + 'python-cymem' + 'python-mock' + 'python-murmurhash' + 'python-numpy' + 'python-plac' + 'python-preshed' + 'python-pydantic' + 'python-six' + 'python-srsly' + 'python-tqdm' + 'python-wasabi') +makedepends=('cython' 'python-build' 'python-installer' 'python-setuptools' 'python-wheel') +# checkdepends=('python-pytest' 'python-hypothesis' 'python-mock') +source=("$pkgname-$pkgver.tar.gz::https://files.pythonhosted.org/packages/source/t/$_pkg/$_pkg-$pkgver.tar.gz") +sha256sums=('eaaea91dc56c041516a829c460423a8aef5357001610c8d6395bce95d8254a0b') + +prepare() { + cd "$_pkg-$pkgver" + sed -i '18c\PACKAGES = find_packages(exclude=["thinc.tests*"])' setup.py + sed -i '5,6d' MANIFEST.in + rm -rf "$_pkg.egg-info" +} build() { - cd "thinc-${pkgver}" + cd "$_pkg-$pkgver" python -m build --wheel --no-isolation --skip-dependency-check } -package() { - cd "thinc-${pkgver}" - python -m installer --destdir="${pkgdir}" dist/*.whl - install -Dm644 LICENSE "$pkgdir/usr/share/licenses/${pkgname}/LICENSE" -} +# check() { +# cd "$_pkg-$pkgver" +# local _py="$(python -c 'import sys; print("".join(map(str, sys.version_info[:2])))')" +# PYTHONPATH="$PWD/build/lib.linux-$CARCH-cpython-$_py" pytest -x thinc +# } -check() { - cd "thinc-${pkgver}" - # python -m pytest +package() { + cd "$_pkg-$pkgver" + PYTHONHASHSEED=0 python -m installer --destdir="$pkgdir" dist/*.whl + local _site="$(python -c 'import site; print(site.getsitepackages()[0])')" + install -d "$pkgdir/usr/share/licenses/$pkgname/" + ln -s "$_site/$_pkg-$pkgver.dist-info/LICENSE" "$pkgdir/usr/share/licenses/$pkgname/" } |