archrelease: copy trunk to community-x86_64
[ArchLinux/community.git] / python-cmsis-pack-manager / trunk / PKGBUILD
blobedcdc6059a1935bdda2eeee510ad86ee1e8efd94
1 # Maintainer: David Runge <dvzrv@archlinux.org>
3 _name=cmsis-pack-manager
4 pkgname=python-cmsis-pack-manager
5 pkgver=0.5.2
6 pkgrel=2
7 pkgdesc="A Rust and Python module for handling CMSIS Pack files"
8 arch=(x86_64)
9 url="https://github.com/pyocd/cmsis-pack-manager"
10 license=(Apache)
11 depends=(
12   gcc-libs
13   glibc
14   python
15   python-appdirs
16   python-cffi
17   python-pyyaml
19 makedepends=(
20   python-build
21   python-installer
22   python-maturin
23   python-wheel
24   rust
26 checkdepends=(
27   python-hypothesis
28   python-jinja
29   python-pytest
31 # disable LTO until ring can be built with it: https://github.com/briansmith/ring/issues/1444
32 options=(!lto)
33 # NOTE: sdist tarball broken and upstream doesn't react at all: https://github.com/pyocd/cmsis-pack-manager/issues/207
34 # source=(https://files.pythonhosted.org/packages/source/${_name::1}/$_name/$_name-$pkgver.tar.gz)
35 source=($url/archive/v$pkgver/$_name-v$pkgver.tar.gz)
36 sha512sums=('3ce4824f9de3390d24fc031b5ba9304ab056ce488df3ba355c3fa2b5abe495269da2e4e4cf85ba3d5a577fce930b8da2deae8309e5fb6f9d997989b7f84d23c5')
37 b2sums=('059b57ad539b815476212184f16508595ab67bd6a0cc0540795ce1f5b8341bc2f94d3519fe42b3281dca8f25bb0cb368e8483c6172d4dd365b72754a4e1dc7cf')
39 build() {
40   cd $_name-$pkgver
41   python -m build --wheel --no-isolation
44 check() {
45   local _site_packages=$(python -c "import site; print(site.getsitepackages()[0])")
47   cd $_name-$pkgver
48   python -m installer --destdir=test_dir dist/*.whl
49   export PYTHONPATH="$PWD/test_dir/$_site_packages:$PYTHONPATH"
50   pytest -vv
53 package() {
54   cd $_name-$pkgver
55   python -m installer --destdir="$pkgdir" dist/*.whl