# Template file for 'esptool'
pkgname=esptool
version=4.11.0
revision=1
build_style=python3-module
hostmakedepends="python3-setuptools"
depends="python3-argcomplete python3-bitstring python3-cryptography
 python3-ecdsa python3-intelhex python3-pyserial python3-reedsolo
 python3-requests python3-yaml"
checkdepends="python3-pytest ${depends} python3-pyelftools"
short_desc="Espressif SoC serial bootloader utility"
maintainer="Orphaned <orphan@voidlinux.org>"
license="GPL-2.0-or-later"
homepage="https://github.com/espressif/esptool"
distfiles="https://github.com/espressif/esptool/archive/refs/tags/v${version}.tar.gz"
checksum=9e82f518718ac66e1135e3cc8171b610cc81132275b349b0f681795be6b2b990

post_extract() {
	# needs access to hardware
	rm test/test_esptool.py
	rm test/test_esptool_sdm.py
	# not supposed to be run by GitHub Actions as per documentation
	rm test/test_espefuse.py
	# needs python3-pkcs11
	rm test/test_espsecure_hsm.py
	# depends on downloaded third-party data, not relevant for packaging
	rm test/test_uf2_ids.py
}
