# Maintainer: J. Nathanael Philipp (jnphilipp) # Contributor: Luis Martinez # Contributor: Philip Goto # Contributor: Chris Brendel pkgname=python-spacy _pkg="${pkgname#python-}" pkgver=3.7.3 pkgrel=1 pkgdesc='Free open-source library for Natural Language Processing in Python' arch=('x86_64' 'aarch64') url='https://github.com/explosion/spacy' license=('MIT') depends=( 'python-catalogue' 'python-cymem' 'python-jinja' 'python-langcodes' 'python-murmurhash' 'python-numpy' 'python-preshed' 'python-pydantic' 'python-requests' 'python-smart_open' 'python-spacy-loggers' 'python-srsly' 'python-thinc' 'python-tqdm' 'python-typer' 'python-wasabi' 'python-weasel') makedepends=( 'cython0' 'python-build' 'python-installer' 'python-setuptools' 'python-wheel') source=("$pkgname-$pkgver.tar.gz::https://files.pythonhosted.org/packages/source/s/$_pkg/$_pkg-$pkgver.tar.gz") sha256sums=('99265028fbdc6e12249c53305e461f79a103637b0e6866c28af0e46365f751e1') prepare() { cd "$_pkg-$pkgver" sed -i '/PACKAGES =/c\PACKAGES = find_packages(exclude=["spacy.tests*"])' setup.py rm -rf "$_pkg.egg-info" } build() { cd "$_pkg-${pkgver}" ## skip dependency check because of pinned deps python -m build --wheel --no-isolation --skip-dependency-check } package() { cd "$_pkg-${pkgver}" 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.dist-info/LICENSE" "$pkgdir/usr/share/licenses/$pkgname/" }