summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 4863e995a56d3ba80480f202c842e495f5e438d5 (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
46
47
48
49
50
# Maintainer: taotieren <admin@taotieren.com>

pkgname=python-compreffor-git
pkgver=0.5.5.r0.g639877c
pkgrel=1
pkgdesc='A CFF table subroutinizer for FontTools'
url='https://github.com/googlefonts/compreffor'
license=('Apache-2.0')
arch=(any)
depends=(python
    python-fonttools)
checkdepends=(python-pytest)
makedepends=(cython
    python-setuptools-git-ls-files
    python-setuptools-scm
    python-{build,installer,wheel}
    git)
provides=("${pkgname%-git}")
conflicts=("${pkgname%-git}")
source=("$pkgname::git+$url.git")
sha256sums=('SKIP')

pkgver() {
    cd "$pkgname"
    git describe --long --tags | sed 's/^v//g;s/\([^-]*-g\)/r\1/;s/-/./g'
}


prepare()
{
    git -C "${srcdir}/${pkgname}" clean -dfx
}


build() {
    cd "$pkgname"
    python setup.py build_ext --inplace
	python setup.py build
}

check() {
    cd "$pkgname/src/python"
    PYTHONPATH=. pytest compreffor/test
}

package() {
    cd "$pkgname"
    python setup.py install --root="$pkgdir" --optimize=1 --skip-build
}