summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: d2e35d56357835401eaaf86e9ba3e0acca460528 (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
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
# Maintainer: Caleb Maclennan <caleb@alerque.com>
# Maintainer: Guillaume Horel <guillaume.horel@gmail.com>

pkgname=python-cffsubr
_pyname=${pkgname#python-}
pkgver=0.3.0
pkgrel=1
pkgdesc='Standalone CFF subroutinizer based on AFDKO tx'
arch=(any)
url="https://github.com/adobe-type-tools/$_pyname"
license=(Apache-2.0)
depends=(afdko
         python
         python-fonttools)
makedepends=(python-{build,installer,wheel}
             python-setuptools-git-ls-files
             python-setuptools-scm)
checkdepends=(python-pytest)
_archive="$_pyname-$pkgver"
source=("https://files.pythonhosted.org/packages/source/${_pyname::1}/$_pyname/$_archive.tar.gz"
        devendor-tx.patch)
sha256sums=('7745150bdb81679facdd11c1f3b87096c4f4dbd4957e8fcebb88c45687952efb'
            '10ec393d97b10ab33ed475bcf6a2c9a5308ac1c82eccd1dd96c21f8e9da77e53')

prepare() {
	cd "$_archive"
	rm -rf external _custom_build
	patch -p0 -i ../devendor-tx.patch
}

build() {
	cd "$_archive"
	python -m build -wn
}

check() {
	cd "$_archive"
	export PYTHONPATH="./src"
	pytest tests
}

package() {
	cd "$_archive"
	python -m installer -d "$pkgdir" dist/*.whl
}