summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichał Górny <mgorny@gentoo.org>2021-06-22 07:29:10 +0200
committerMichał Górny <mgorny@gentoo.org>2021-06-22 07:54:26 +0200
commit487c429906f33f2a5cd50d8987168ad6ec6f9275 (patch)
tree3004d91699cf9ef79177f50f5cd7c1661ba4a66b
parentdev-python/pysimdjson: Bump to 4.0.2 (diff)
downloadgentoo-487c429906f33f2a5cd50d8987168ad6ec6f9275.tar.gz
gentoo-487c429906f33f2a5cd50d8987168ad6ec6f9275.tar.bz2
gentoo-487c429906f33f2a5cd50d8987168ad6ec6f9275.zip
dev-python/isort: Bump to 5.9.1
Signed-off-by: Michał Górny <mgorny@gentoo.org>
-rw-r--r--dev-python/isort/Manifest1
-rw-r--r--dev-python/isort/isort-5.9.1.ebuild59
2 files changed, 60 insertions, 0 deletions
diff --git a/dev-python/isort/Manifest b/dev-python/isort/Manifest
index 4ecc0049f124..3a2d0fd4ff31 100644
--- a/dev-python/isort/Manifest
+++ b/dev-python/isort/Manifest
@@ -1 +1,2 @@
DIST isort-5.8.0.tar.gz 167927 BLAKE2B 59b9ee4e63e231026e25833ef8bc4a782ad7b30622d1f6b61fe177fbf0f8663ca953f68cf168abb407d3cb90fe98e29540ec3a8933a5df2ca7ba3e938ba4282f SHA512 ffeee045b5328fa410673464b2ca22d9cd1ba8dd34eff9a430b93e9ce72033100e32e3373308438bcb82b8eb7deea1f2087091e111b1204e35791958ca6944c4
+DIST isort-5.9.1.gh.tar.gz 727733 BLAKE2B dc207ac24b586eb5c4c2bd546c0f2ab336c901563e3f2c92d917cf81bc94634c23a20dfe787e65c41fd3aec835d3fdc96721ed579c282b4cb0719afa7f50f9a3 SHA512 e48e08835a71271ab01e52e2c44ecef475aa270ab7242aff4f9ce82bcd5bc8354e2d8a717ccf995172102809198f6dfc9786d8c64e33afc9ae9a4e981ac51feb
diff --git a/dev-python/isort/isort-5.9.1.ebuild b/dev-python/isort/isort-5.9.1.ebuild
new file mode 100644
index 000000000000..a32718f7bb0d
--- /dev/null
+++ b/dev-python/isort/isort-5.9.1.ebuild
@@ -0,0 +1,59 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+DISTUTILS_USE_SETUPTOOLS=pyproject.toml
+PYTHON_COMPAT=( python3_{8..9} )
+
+inherit distutils-r1
+
+DESCRIPTION="A python utility/library to sort imports"
+HOMEPAGE="https://pypi.org/project/isort/"
+SRC_URI="
+ https://github.com/PyCQA/isort/archive/${PV}.tar.gz
+ -> ${P}.gh.tar.gz"
+
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~ia64 ~ppc ~ppc64 ~sparc ~x86 ~amd64-linux ~x86-linux ~x64-macos"
+
+RDEPEND="
+ dev-python/toml[${PYTHON_USEDEP}]"
+BDEPEND="
+ test? (
+ dev-python/black[${PYTHON_USEDEP}]
+ dev-python/colorama[${PYTHON_USEDEP}]
+ dev-python/hypothesis[${PYTHON_USEDEP}]
+ dev-python/pylama[${PYTHON_USEDEP}]
+ dev-python/pytest-mock[${PYTHON_USEDEP}]
+ dev-vcs/git
+ )
+"
+
+distutils_enable_tests pytest
+
+src_prepare() {
+ # unbundle toml
+ sed -i -e 's:from ._vendored ::' isort/settings.py || die
+
+ distutils-r1_src_prepare
+}
+
+python_test() {
+ # Some tests run the "isort" command
+ distutils_install_for_testing
+ # Install necessary plugins
+ local p
+ for p in example*/; do
+ pushd "${p}" >/dev/null || die
+ distutils_install_for_testing
+ popd >/dev/null || die
+ done
+
+ local deselect=(
+ # Excluded from upstream's test script
+ tests/unit/test_deprecated_finders.py
+ )
+ epytest tests/unit ${deselect[@]/#/--deselect }
+}