summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 8b503daafb4f09fd4d665cfb6ef8d21f6b93b020 (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
# Maintainer: taotieren <admin@taotieren.com>

pkgname=python-pyclipper-git
pkgver=1.3.0.post5.r3.g410553d
pkgrel=1
pkgdesc='Cython wrapper for the C++ translation of the Angus Johnsons Clipper library'
url='https://github.com/fonttools/pyclipper'
license=('MIT')
arch=(any)
depends=(python)
makedepends=(cython
             python-{build,installer,wheel,pip}
             python-setuptools-scm
             git)
checkdepends=(python-pytest)
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"
    python setup.py test
}

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