# Maintainer: Caleb Maclennan # Maintainer: Adrián Pérez de Castro _project=ots-python _pyname=opentype-sanitizer pkgname=python-$_pyname pkgver=8.2.2 pkgrel=1 pkgdesc='Python wheels for the OpenType Sanitizer' arch=(any) url="https://github.com/googlefonts/$_project" license=(GPL3) depends=(ots python) checkdepends=(python-pytest woff2) makedepends=(python-setuptools-scm) _archive="$_pyname-$pkgver" source=("https://files.pythonhosted.org/packages/source/${_pyname::1}/$_pyname/$_archive.tar.gz" system-ots-sanitize.patch) sha256sums=('0b01a71314b6545544d540aa657ddf9fb6967bff69c57c8b5803aafbd7bf221a' '6388d57e44f3dc7d6ee91422b30ca9eca3e3c590bacaa7bc4664b6183ed4d065') prepare () { cd "$_archive" patch -p0 < "../system-ots-sanitize.patch" } build() { cd "$_archive" python setup.py build } check() { cd "$_archive" PYTHONPATH=src/python pytest } package() { cd "$_archive" python setup.py install --root="$pkgdir" --optimize=1 --skip-build }