diff --git a/srcpkgs/python-isort/template b/srcpkgs/python-isort/template new file mode 100644 index 00000000000..76babc2c9ad --- /dev/null +++ b/srcpkgs/python-isort/template @@ -0,0 +1,35 @@ +# Template file for 'python-isort' +pkgname=python-isort +version=4.2.5 +revision=1 +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 " +homepage="https://github.com/timothycrosley/isort" +license="MIT" +distfiles="${PYPI_SITE}/i/isort/isort-${version}.tar.gz" +checksum=56b20044f43cf6e6783fe95d054e754acca52dd43fbe9277c1bdff835537ea5c +alternatives="isort:isort:/usr/bin/isort2" + +post_install() { + sed -n '/Copyright/,/SOFTWARE\./p' isort/__init__.py >LICENSE + 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 + } +} diff --git a/srcpkgs/python3-isort b/srcpkgs/python3-isort new file mode 120000 index 00000000000..7b803ff7bfe --- /dev/null +++ b/srcpkgs/python3-isort @@ -0,0 +1 @@ +python-isort \ No newline at end of file