blob: db1aa9651538aedbbc954d0f4f65f2ccd59fc10f (
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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
|
# Maintainer: taotieren <admin@taotieren.com>
pkgname=python-spsdk-mcu-link
_name=${pkgname#python-}
pkgver=0.6.14
pkgrel=2
pkgdesc="SPSDK MCU-Link. A debugger probe plugin for SPSDK supporting LPC-Link/MCU-Link from NXP."
arch=(any)
url="https://pypi.org/project/${_name}"
license=(BSD-3-Clause)
depends=(
python
python-hid
python-pyusb
# AUR
python-spsdk
python-libusb-package
python-wasmtime
pyinstaller
)
makedepends=(
python-build
python-installer
python-setuptools
python-setuptools-scm
python-toml
python-wheel
)
checkdepends=(
python-pytest
python-click
)
optdepends=(
'stlink: for stlink device detection via udev'
)
groups=(spsdk-plugins)
provides=(${_name})
conflicts=(${_name})
replaces=(${_name})
source=("${_name}-${pkgver}.tar.gz::https://files.pythonhosted.org/packages/source/s/spsdk-mcu-link/spsdk_mcu_link-${pkgver}.tar.gz")
sha512sums=('bf3e7e801ef9977293541e2ab6c700ece4345b2269cfa7f57cd2e0dffc87a5fead949ed0792086a3f5ee69a123fd4d58784bb4f5db5a4430cbeaae1cda965da5')
_name=${_name//-/_}
build() {
cd ${srcdir}/$_name-$pkgver
python -m build --wheel --no-isolation
}
_check() {
local _site_packages=$(python -c "import site; print(site.getsitepackages()[0])")
local pytest_options=(
-vv
# breaks due to changes in test facilities in Python 3.12
--deselect test/unit/test_autoflush.py::TestAutoflush::test_transfer_err_not_flushed
)
cd ${srcdir}/$_name-$pkgver
# install to temporary location
python -m installer --destdir=test_dir dist/*.whl
export PYTHONPATH="test_dir/$_site_packages:$PYTHONPATH"
pytest "${pytest_options[@]}"
}
package() {
cd ${srcdir}/$_name-$pkgver
python -m installer --destdir="$pkgdir" dist/*.whl
install -Dm644 LICENSE -t ${pkgdir}/usr/share/licenses/${pkgname}/
}
|