summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 60cae039cbd464cd9068b995cc7bfa5898d36db2 (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
# Maintainer: Anakojm <https://anakojm.net/about.html>

pkgname='python-hwrt'
_name=${pkgname#python-}
pkgver=0.2.1
pkgrel=1
pkgdesc="HandWriting Recognition Toolkit, draw and get the LaTeX command"
arch=('any')
url="https://pypi.org/project/$_name/"
license=('MIT')
depends=('python>=3.6.0' 'python-numpy' 'python-scipy' 'python-pymysql' 'python-pillow' 'python-natsort' 'python-matplotlib' 'python-yaml' 'python-flask' 'python-click' 'python-setuptools' 'python-jinja' 'python-bootstrap-flask' 'python-nntoolkit' 'python-h5py' 'python-keras')
makedepends=('python-build' 'python-installer' 'python-wheel')
source=("https://files.pythonhosted.org/packages/source/${_name::1}/$_name/$_name-$pkgver.tar.gz")
sha256sums=('38d425cc7524794c61f6e4444e14300db28c4e989f2851b2708cd57a50c0902e')

build(){
    cd "$_name-$pkgver"
    python -m build --wheel --no-isolation
}

package(){
    cd "$_name-$pkgver"

    _pythonversion="$(python --version | awk '{print $2}' | awk -F. '{print $1"."$2}')"
    python -m installer --destdir="$pkgdir" dist/*.whl
    rm -Rfv "${pkgdir}/usr/lib/python${_pythonversion}/site-packages/tests"
}