summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 14083fa8a102884b11d594b0ed8867d5f3b819ab (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-cmsis-svd-git
pkgver=0.4.r221.g1bea425
pkgrel=1
pkgdesc='Aggegration of ARM Cortex-M (and other) CMSIS SVDs and related tools'
url='https://github.com/cmsis-svd/cmsis-svd'
license=('Apache-2.0')
arch=(any)
depends=(python
    python-lxml
    python-six)
# checkdepends=(python-pytest
#     python-nose2
#     python-pytest-subtests)
makedepends=(
    python-build
    python-installer
    python-setuptools
    python-wheel
    git)
provides=("${pkgname%-git}" "cmsis-svd")
conflicts=("${pkgname%-git}" "cmsis-svd")
source=("$pkgname::git+$url.git")
sha256sums=('SKIP')

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

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

# check() {
#     cd "${srcdir}/$pkgname/python"
#     PYTHONPATH=build pytest build/lib
# }

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