summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 0454a0d186b73ff5bebaf0ea9b871dd7c552d2d0 (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
# Maintainer: Renato Caldas <renato@calgera.com>
_name=kicadmodtree
pkgname="python-${_name}-git"
pkgver=v1.1.2.r3307.401a7c67d
pkgrel=1
pkgdesc="KiCad Footprint Generator, creating kicad footprints using python scripts"
arch=('any')
url="https://gitlab.com/kicad/libraries/kicad-footprint-generator"
license=('GPL')
depends=('python-asteval' 'python-typing_extensions' 'python-pyyaml' 'python-future'
    'python-tabulate' 'python-pyclipper')
makedepends=('git' 'python-build' 'python-installer' 'python-wheel')
checkdepends=('python-pytest')
provides=("${pkgname%-git}")
conflicts=("${pkgname%-git}")
source=("${_name}::git+https://gitlab.com/kicad/libraries/kicad-footprint-generator.git")
md5sums=('SKIP')

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

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

check() {
    cd "$srcdir/${_name}"
    pytest -vv
}

package() {
    cd "$srcdir/${_name}"
    python -m installer --destdir="$pkgdir" dist/*.whl
}