commit:     9a66676b3011d9d20ad93e9a78fe0a1a6be3e595
Author:     Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Sat Jul 13 04:34:06 2024 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Sat Jul 13 04:44:54 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=9a66676b

dev-python/pipdeptree: Fix ImportError with unbundled pip

Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>

 .../{pipdeptree-2.16.2.ebuild => pipdeptree-2.16.2-r1.ebuild}     | 8 ++++++++
 .../{pipdeptree-2.17.0.ebuild => pipdeptree-2.17.0-r1.ebuild}     | 7 +++++++
 .../{pipdeptree-2.21.0.ebuild => pipdeptree-2.21.0-r1.ebuild}     | 7 +++++++
 .../{pipdeptree-2.23.0.ebuild => pipdeptree-2.22.0-r1.ebuild}     | 7 +++++++
 .../{pipdeptree-2.22.0.ebuild => pipdeptree-2.23.0-r1.ebuild}     | 7 +++++++
 5 files changed, 36 insertions(+)

diff --git a/dev-python/pipdeptree/pipdeptree-2.16.2.ebuild 
b/dev-python/pipdeptree/pipdeptree-2.16.2-r1.ebuild
similarity index 86%
rename from dev-python/pipdeptree/pipdeptree-2.16.2.ebuild
rename to dev-python/pipdeptree/pipdeptree-2.16.2-r1.ebuild
index dbb4e804f288..8c04dc58e0a6 100644
--- a/dev-python/pipdeptree/pipdeptree-2.16.2.ebuild
+++ b/dev-python/pipdeptree/pipdeptree-2.16.2-r1.ebuild
@@ -19,6 +19,7 @@ SLOT="0"
 KEYWORDS="~amd64 ~arm64 ~riscv"
 
 RDEPEND="
+       >=dev-python/packaging-23.1[${PYTHON_USEDEP}]
        >=dev-python/pip-23.1.2[${PYTHON_USEDEP}]
 "
 BDEPEND="
@@ -38,6 +39,13 @@ PATCHES=(
 
 distutils_enable_tests pytest
 
+src_prepare() {
+       distutils-r1_src_prepare
+
+       find -name '*.py' -exec \
+               sed -i -e 's:pip[.]_vendor[.]::' {} + || die
+}
+
 python_test() {
        local -x PYTEST_DISABLE_PLUGIN_AUTOLOAD=1
        epytest -p pytest_mock

diff --git a/dev-python/pipdeptree/pipdeptree-2.17.0.ebuild 
b/dev-python/pipdeptree/pipdeptree-2.17.0-r1.ebuild
similarity index 90%
rename from dev-python/pipdeptree/pipdeptree-2.17.0.ebuild
rename to dev-python/pipdeptree/pipdeptree-2.17.0-r1.ebuild
index d4b8329e97ea..ab9fab7bed89 100644
--- a/dev-python/pipdeptree/pipdeptree-2.17.0.ebuild
+++ b/dev-python/pipdeptree/pipdeptree-2.17.0-r1.ebuild
@@ -39,6 +39,13 @@ PATCHES=(
 
 distutils_enable_tests pytest
 
+src_prepare() {
+       distutils-r1_src_prepare
+
+       find -name '*.py' -exec \
+               sed -i -e 's:pip[.]_vendor[.]::' {} + || die
+}
+
 python_test() {
        local -x PYTEST_DISABLE_PLUGIN_AUTOLOAD=1
        epytest -p pytest_mock

diff --git a/dev-python/pipdeptree/pipdeptree-2.21.0.ebuild 
b/dev-python/pipdeptree/pipdeptree-2.21.0-r1.ebuild
similarity index 90%
rename from dev-python/pipdeptree/pipdeptree-2.21.0.ebuild
rename to dev-python/pipdeptree/pipdeptree-2.21.0-r1.ebuild
index dae7c7c1be5b..2e77548af84f 100644
--- a/dev-python/pipdeptree/pipdeptree-2.21.0.ebuild
+++ b/dev-python/pipdeptree/pipdeptree-2.21.0-r1.ebuild
@@ -39,6 +39,13 @@ PATCHES=(
 
 distutils_enable_tests pytest
 
+src_prepare() {
+       distutils-r1_src_prepare
+
+       find -name '*.py' -exec \
+               sed -i -e 's:pip[.]_vendor[.]::' {} + || die
+}
+
 python_test() {
        local -x PYTEST_DISABLE_PLUGIN_AUTOLOAD=1
        epytest -p pytest_mock -p console-scripts

diff --git a/dev-python/pipdeptree/pipdeptree-2.23.0.ebuild 
b/dev-python/pipdeptree/pipdeptree-2.22.0-r1.ebuild
similarity index 89%
rename from dev-python/pipdeptree/pipdeptree-2.23.0.ebuild
rename to dev-python/pipdeptree/pipdeptree-2.22.0-r1.ebuild
index bf7d74541259..0f2bc0747e89 100644
--- a/dev-python/pipdeptree/pipdeptree-2.23.0.ebuild
+++ b/dev-python/pipdeptree/pipdeptree-2.22.0-r1.ebuild
@@ -34,6 +34,13 @@ BDEPEND="
 
 distutils_enable_tests pytest
 
+src_prepare() {
+       distutils-r1_src_prepare
+
+       find -name '*.py' -exec \
+               sed -i -e 's:pip[.]_vendor[.]::' {} + || die
+}
+
 python_test() {
        local -x PYTEST_DISABLE_PLUGIN_AUTOLOAD=1
        epytest -p pytest_mock -p console-scripts

diff --git a/dev-python/pipdeptree/pipdeptree-2.22.0.ebuild 
b/dev-python/pipdeptree/pipdeptree-2.23.0-r1.ebuild
similarity index 89%
rename from dev-python/pipdeptree/pipdeptree-2.22.0.ebuild
rename to dev-python/pipdeptree/pipdeptree-2.23.0-r1.ebuild
index bf7d74541259..0f2bc0747e89 100644
--- a/dev-python/pipdeptree/pipdeptree-2.22.0.ebuild
+++ b/dev-python/pipdeptree/pipdeptree-2.23.0-r1.ebuild
@@ -34,6 +34,13 @@ BDEPEND="
 
 distutils_enable_tests pytest
 
+src_prepare() {
+       distutils-r1_src_prepare
+
+       find -name '*.py' -exec \
+               sed -i -e 's:pip[.]_vendor[.]::' {} + || die
+}
+
 python_test() {
        local -x PYTEST_DISABLE_PLUGIN_AUTOLOAD=1
        epytest -p pytest_mock -p console-scripts

Reply via email to