# Template file for 'python-isort'
pkgname=python-isort
version=4.2.15
revision=2
noarch=yes
wrksrc="isort-${version}"
build_style=python-module
pycompile_module="isort"
hostmakedepends="python-setuptools python3-setuptools"
depends="python-setuptools"
short_desc="Python2 utility/library to sort imports"
maintainer="Alessio Sergi <al3hex@gmail.com>"
homepage="https://github.com/timothycrosley/isort"
license="MIT"
distfiles="${PYPI_SITE}/i/isort/isort-${version}.tar.gz"
checksum=79f46172d3a4e2e53e7016e663cc7a8b538bec525c36675fcfd2767df30b3983
alternatives="isort:isort:/usr/bin/isort2"

post_install() {
	vlicense LICENSE
}

python3-isort_package() {
	noarch=yes
	pycompile_module="isort"
	depends="python3-setuptools"
	short_desc="${short_desc/Python2/Python3}"
	alternatives="isort:isort:/usr/bin/isort3"
	pkg_install() {
		vmove usr/bin/isort3
		vmove usr/lib/python3*
		vlicense LICENSE
	}
}
