Michał Polański e0dfa9eb8c testing/esptool: upgrade to 4.0
and build with py3-build
2022-05-20 02:21:12 +02:00

39 lines
1.2 KiB
Plaintext

# Contributor: Sören Tempel <soeren+alpine@soeren-tempel.net>
# Contributor: Michał Polański <michal@polanski.me>
# Maintainer: Michał Polański <michal@polanski.me>
pkgname=esptool
pkgver=4.0
pkgrel=0
pkgdesc="ESP8266 and ESP32 serial bootloader utility"
url="https://docs.espressif.com/projects/esptool"
license="GPL-2.0-or-later"
arch="noarch"
depends="python3 py3-cryptography py3-ecdsa py3-pyserial py3-bitstring py3-reedsolo"
makedepends="py3-build py3-installer py3-setuptools py3-wheel"
checkdepends="py3-elftools"
source="https://github.com/espressif/esptool/archive/v$pkgver/esptool-$pkgver.tar.gz"
build() {
python3 -m build --no-isolation --wheel
}
check() {
python3 -m installer -d testenv \
dist/esptool-$pkgver-py3-none-any.whl
local sitedir="$(python3 -c 'import site;print(site.getsitepackages()[0])')"
for test in imagegen espsecure merge_bin modules; do
PYTHONPATH="$PWD/testenv/$sitedir" python3 test/test_$test.py
done
}
package() {
python3 -m installer -d "$pkgdir" \
dist/esptool-$pkgver-py3-none-any.whl
}
sha512sums="
79964c42b812af58cdcb4ddf67fd9f54645d5027bb0c48da545e759465201d14e9b87558e2424aace063b1db37ac6af57b414752b10864adc9d611a5c9b337ea esptool-4.0.tar.gz
"