summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichał Górny <mgorny@gentoo.org>2021-11-03 21:37:53 +0100
committerMichał Górny <mgorny@gentoo.org>2021-11-03 21:52:59 +0100
commit7090c1999677bb59e83012423e942e9eebd17bde (patch)
treeb09afba24d4a9b6311b5fbce8688a97e92346b89
parentdev-python/prettytable: Bump to 2.4.0 (diff)
downloadgentoo-7090c1999677bb59e83012423e942e9eebd17bde.tar.gz
gentoo-7090c1999677bb59e83012423e942e9eebd17bde.tar.bz2
gentoo-7090c1999677bb59e83012423e942e9eebd17bde.zip
dev-python/isort: Bump to 5.10.0
Signed-off-by: Michał Górny <mgorny@gentoo.org>
-rw-r--r--dev-python/isort/Manifest1
-rw-r--r--dev-python/isort/isort-5.10.0.ebuild59
2 files changed, 60 insertions, 0 deletions
diff --git a/dev-python/isort/Manifest b/dev-python/isort/Manifest
index 73a9c3a104bc..a35ec3b01029 100644
--- a/dev-python/isort/Manifest
+++ b/dev-python/isort/Manifest
@@ -1 +1,2 @@
+DIST isort-5.10.0.gh.tar.gz 728239 BLAKE2B 6a206cdd4ebceb29f8c76f1c08b3217da1d76b56bbfbf177175d08f502884ae1f0700dc1443c92c28d68d257cb6468e2210d35a2003680303aa2ae9eaefe3ce3 SHA512 e8de97d6714ad626974e601a676b35a324b306a9f6033fd5cdd4cf5a5caf29cbc3238dca8cbf38e749866776f01aa58026159f53a4181f6637daf93181726ad2
DIST isort-5.9.3.gh.tar.gz 729342 BLAKE2B f40f046c5706ea4fd6daf7dc8eaccaca35e7de3e77bc17fa73681d12c42f7d2a3b19a909384e6b2e2486679a9f9895c2fa944faace4bbc3d0cfd0ec7aff85edd SHA512 96aa9c8bb58c95a41f562d3f0e1cf6e9c0c4158486bca24dfe2293fc86c7c6b74e3e6a84ed755d965b692b1f06d98cdc8ed69080775f8acd9186ac3ae6401570
diff --git a/dev-python/isort/isort-5.10.0.ebuild b/dev-python/isort/isort-5.10.0.ebuild
new file mode 100644
index 000000000000..b47f36b80ae6
--- /dev/null
+++ b/dev-python/isort/isort-5.10.0.ebuild
@@ -0,0 +1,59 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+DISTUTILS_USE_SETUPTOOLS=pyproject.toml
+PYTHON_COMPAT=( python3_{8..10} )
+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 ~hppa ~ia64 ~m68k ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86"
+
+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/natsort[${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 EPYTEST_IGNORE=(
+ # Excluded from upstream's test script
+ tests/unit/test_deprecated_finders.py
+ )
+ epytest tests/unit
+}