summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichał Górny <mgorny@gentoo.org>2023-11-06 12:45:13 +0100
committerMichał Górny <mgorny@gentoo.org>2023-11-06 12:45:41 +0100
commit970472e195c28544c78509265fa2b8a7864cdf13 (patch)
treeedff2df6cb8eb20e3d4a4b0ebd8f1c37dc5e3b8b /dev-python
parentsci-libs/scikit-optimize: pep517, numpy-1.24 compat (diff)
downloadgentoo-970472e195c28544c78509265fa2b8a7864cdf13.tar.gz
gentoo-970472e195c28544c78509265fa2b8a7864cdf13.tar.bz2
gentoo-970472e195c28544c78509265fa2b8a7864cdf13.zip
dev-python/dirty-equals: Remove the dep on <dev-python/pydantic-2
Remove the dependency on <dev-python/pydantic-2. It is used only for the IsUrl class, and this class is not used by any reverse dependency. Furthermore, there does not seem to be any progress on fixing it to work with >=dev-python/pydantic-2. Signed-off-by: Michał Górny <mgorny@gentoo.org>
Diffstat (limited to 'dev-python')
-rw-r--r--dev-python/dirty-equals/dirty-equals-0.6.0-r3.ebuild (renamed from dev-python/dirty-equals/dirty-equals-0.6.0-r2.ebuild)22
1 files changed, 20 insertions, 2 deletions
diff --git a/dev-python/dirty-equals/dirty-equals-0.6.0-r2.ebuild b/dev-python/dirty-equals/dirty-equals-0.6.0-r3.ebuild
index 45dacef97239..d11e92a9c462 100644
--- a/dev-python/dirty-equals/dirty-equals-0.6.0-r2.ebuild
+++ b/dev-python/dirty-equals/dirty-equals-0.6.0-r3.ebuild
@@ -24,7 +24,6 @@ SLOT="0"
KEYWORDS="amd64 arm arm64 ~loong ppc ppc64 ~riscv ~s390 sparc x86"
RDEPEND="
- <dev-python/pydantic-2[${PYTHON_USEDEP}]
>=dev-python/pytz-2021.3[${PYTHON_USEDEP}]
"
BDEPEND="
@@ -36,12 +35,31 @@ BDEPEND="
distutils_enable_tests pytest
+src_prepare() {
+ # hackaround IsUrl use in global scope (for parametrize)
+ if ! has_version "dev-python/pydantic[${PYTHON_USEDEP}]"; then
+ sed -i -e 's:IsUrl([^)]*):IsUrl:g' tests/test_other.py || die
+ fi
+
+ distutils-r1_src_prepare
+}
+
python_test() {
local EPYTEST_IGNORE=(
# require unpackaged pytest-examples
tests/test_docs.py
)
+ local args=()
+
+ if ! has_version "<dev-python/pydantic-2[${PYTHON_USEDEP}]"; then
+ args+=(
+ # IsUrl is not used in any revdeps, and it's broken
+ # with pydantic-2
+ # https://github.com/samuelcolvin/dirty-equals/issues/72
+ -k "not is_url"
+ )
+ fi
local -x TZ=UTC
- epytest
+ epytest "${args[@]}"
}