diff options
author | AtticFinder65536 | 2023-01-23 19:44:34 +1100 |
---|---|---|
committer | AtticFinder65536 | 2023-01-23 19:44:34 +1100 |
commit | e9761d40e6f0a2e6e895d043eb1521ab4b34cee4 (patch) | |
tree | 2506693ff8c4d8972e06eb305f97bfd4b9276bb2 /PKGBUILD | |
download | aur-python-fugashi.tar.gz |
Import
Diffstat (limited to 'PKGBUILD')
-rw-r--r-- | PKGBUILD | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..3ed16e44ab84 --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,35 @@ +# Maintainer: AtticFinder65536 <atticfinder -AT- rocklabs -DOT- xyz> + +pkgname=('python-fugashi') +_name=${pkgname#python-} +pkgver=1.2.1 +pkgrel=3 +pkgdesc="Cython MeCab wrapper for fast, pythonic Japanese tokenization and morphological analysis" +url="https://github.com/polm/fugashi" +license=('MIT') +source=("https://files.pythonhosted.org/packages/source/${_name::1}/$_name/$_name-$pkgver.tar.gz") +b2sums=('4f9f9316831e05e910085e1eff9cd2ef3743443b6f93cb5e9c94a901090e58b04d4d3f863c0394239f484ab62eb0f88a9f457ea9696561cf2f7f12cdfd48716a') +arch=('any') +depends=('python' 'cython' 'mecab') +makedepends=('python-setuptools' 'python-wheel' 'python-setuptools-scm') +optdepends=('python-unidic: Use the latest version of UniDic, large install size' + 'python-unidic-lite: Use a lite version of UniDic') +checkdepends=('python-pytest' 'python-ipadic' 'mecab-ipadic' 'python-unidic-lite') +install=python-fugashi.install + +build(){ + cd "${_name}-${pkgver}" + python setup.py build +} + +check(){ + cd "${_name}-${pkgver}" + local python_version=$(python -c 'import sys; print("".join(map(str, sys.version_info[:2])))') + PYTHONPATH="$PWD/build/lib.linux-$CARCH-cpython-${python_version}" pytest +} + +package(){ + cd "${_name}-${pkgver}" + python setup.py install --root="$pkgdir" --optimize=1 --skip-build + install -Dm644 LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE" +} |