# Template file for 'python3-isort'
pkgname=python3-isort
version=5.13.2
revision=2
build_style=python3-pep517
hostmakedepends="python3-poetry-core"
depends="python3"
checkdepends="python3-pytest python3-hypothesis python3-colorama black git
 python3-setuptools"
short_desc="Python3 utility/library to sort imports"
maintainer="Orphaned <orphan@voidlinux.org>"
license="MIT"
homepage="https://github.com/PyCQA/isort"
changelog="https://raw.githubusercontent.com/PyCQA/isort/main/CHANGELOG.md"
distfiles="${PYPI_SITE}/i/isort/isort-${version}.tar.gz"
checksum=48fdfcb9face5d58a4f6dde2e72a1fb8dcaf8ab26f95ab49fab84c2ddefb0109
conflicts="python-isort>=0"
make_check=no # FIXME

do_check() {
	rm -f tests/integration/test_hypothesmith.py # needs unpackaged libcst
	rm -f tests/unit/test_pylama_isort.py # needs unpackaged pylama
	rm -rf tmp # remove artifacts from previous unsuccessful check run
	mkdir tmp
	bsdtar xf dist/isort-$version-py3-none-any.whl -C tmp
	PYTHONPATH=tmp pytest
	rm -rf tmp
}

post_install() {
	vlicense LICENSE
}
