commit: f9ff6d2517c5d25dea8a617621101ff39d2640fe
Author: Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Sat May 11 05:37:43 2024 +0000
Commit: Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Sat May 11 05:38:18 2024 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f9ff6d25
dev-python/ini2toml: Move pyproject-fmt dep under test-rust
Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>
dev-python/ini2toml/ini2toml-0.14.ebuild | 27 +++++++++++++++++++++------
1 file changed, 21 insertions(+), 6 deletions(-)
diff --git a/dev-python/ini2toml/ini2toml-0.14.ebuild
b/dev-python/ini2toml/ini2toml-0.14.ebuild
index ede0b552f23d..cdf1678fcf02 100644
--- a/dev-python/ini2toml/ini2toml-0.14.ebuild
+++ b/dev-python/ini2toml/ini2toml-0.14.ebuild
@@ -17,6 +17,7 @@ HOMEPAGE="
LICENSE="MPL-2.0"
SLOT="0"
KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~loong ~m68k ~mips ppc ppc64
~riscv ~s390 sparc x86"
+IUSE="test-rust"
RDEPEND="
>=dev-python/packaging-20.7[${PYTHON_USEDEP}]
@@ -27,20 +28,34 @@ BDEPEND="
dev-python/setuptools-scm[${PYTHON_USEDEP}]
test? (
dev-python/configupdater[${PYTHON_USEDEP}]
- >=dev-python/pyproject-fmt-0.4.0[${PYTHON_USEDEP}]
dev-python/tomli[${PYTHON_USEDEP}]
dev-python/tomlkit[${PYTHON_USEDEP}]
+ test-rust? (
+ >=dev-python/pyproject-fmt-0.4.0[${PYTHON_USEDEP}]
+ )
)
"
distutils_enable_tests pytest
-EPYTEST_IGNORE=(
- # validate_pyproject is not packaged
- tests/test_examples.py
-)
-
src_prepare() {
sed -i -e 's:--cov ini2toml --cov-report term-missing::' setup.cfg ||
die
distutils-r1_src_prepare
}
+
+python_test() {
+ local EPYTEST_IGNORE=(
+ # validate_pyproject is not packaged
+ tests/test_examples.py
+ )
+ local EPYTEST_DESELECT=()
+
+ if ! has_version ">=dev-python/pyproject-fmt-0.4.0[${PYTHON_USEDEP}]";
then
+ EPYTEST_DESELECT+=(
+ tests/test_cli.py::test_auto_formatting
+ )
+ fi
+
+ local -x PYTEST_DISABLE_PLUGIN_AUTOLOAD=1
+ epytest
+}