* [gentoo-commits] repo/gentoo:master commit in: dev-python/pipdeptree/files/, dev-python/pipdeptree/
@ 2024-04-06 14:42 Michał Górny
0 siblings, 0 replies; 3+ messages in thread
From: Michał Górny @ 2024-04-06 14:42 UTC (permalink / raw
To: gentoo-commits
commit: 5d7a38732cc5c723e615283d28f144301883cccc
Author: Alfred Wingate <parona <AT> protonmail <DOT> com>
AuthorDate: Sat Apr 6 07:34:51 2024 +0000
Commit: Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Sat Apr 6 14:39:43 2024 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=5d7a3873
dev-python/pipdeptree: add 2.17.0
Signed-off-by: Alfred Wingate <parona <AT> protonmail.com>
Closes: https://github.com/gentoo/gentoo/pull/36133
Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>
dev-python/pipdeptree/Manifest | 1 +
...ipdeptree-2.17.0-expect-hpy-in-pypy-7.3.3.patch | 28 ++++++++++++
dev-python/pipdeptree/pipdeptree-2.17.0.ebuild | 51 ++++++++++++++++++++++
3 files changed, 80 insertions(+)
diff --git a/dev-python/pipdeptree/Manifest b/dev-python/pipdeptree/Manifest
index c9f50bf22109..88b46781bb9a 100644
--- a/dev-python/pipdeptree/Manifest
+++ b/dev-python/pipdeptree/Manifest
@@ -1 +1,2 @@
DIST pipdeptree-2.16.2.tar.gz 32151 BLAKE2B 18715b0c7835e19bd5b6846922990e321a7e06315642204e7d79375a50b692f87e2ba1ec5884c4f69ff6e8d75e863c8cf372152aca7561ab94ef265d3c1df9fb SHA512 06d72f94a9165fe52cc15b9f539e3adb6da99e4a63cae78928bf68be3499b2828a5d471f270455b94a960ba2fe2f6319f5319c20ed270029a38a81173a7cd403
+DIST pipdeptree-2.17.0.tar.gz 34677 BLAKE2B 3f92c4361978d2a6b1ae46d3a7e21aca231d504abf3a3cc8388d64a70fc3853a33edeac091a0b60cd3043d86162f6816292f973e9c8691420f906e946a5c9dac SHA512 1e7a4bc7f2f872e9d3115b413acc791eeb912a6f428fca772e30a3c8164ecfa44bba7e5246f9b65cbc4d34ffcd8050ff795ced3e3f9ad918f134ce052a8e8992
diff --git a/dev-python/pipdeptree/files/pipdeptree-2.17.0-expect-hpy-in-pypy-7.3.3.patch b/dev-python/pipdeptree/files/pipdeptree-2.17.0-expect-hpy-in-pypy-7.3.3.patch
new file mode 100644
index 000000000000..09c31f8a78b4
--- /dev/null
+++ b/dev-python/pipdeptree/files/pipdeptree-2.17.0-expect-hpy-in-pypy-7.3.3.patch
@@ -0,0 +1,28 @@
+https://github.com/tox-dev/pipdeptree/pull/302
+
+From 1fc794e66fc5cac464704dda1bc303353386584f Mon Sep 17 00:00:00 2001
+From: Alfred Wingate <parona@protonmail.com>
+Date: Tue, 14 Nov 2023 08:36:09 +0200
+Subject: [PATCH] Expect hpy in pypy versions >= 7.3.3
+
+Signed-off-by: Alfred Wingate <parona@protonmail.com>
+--- a/tests/test_non_host.py
++++ b/tests/test_non_host.py
+@@ -32,8 +32,12 @@ def test_custom_interpreter(
+ implementation = python_implementation()
+ if implementation == "CPython":
+ expected = {"pip", "setuptools", "wheel"}
+- elif implementation == "PyPy":
+- expected = {"cffi", "greenlet", "pip", "readline", "setuptools", "wheel"} # pragma: no cover
++ elif implementation == "PyPy": # pragma: no cover
++ # hpy added in 7.3.2, enabled in 7.3.3
++ if sys.pypy_version_info >= (7, 3, 3): # type: ignore[attr-defined]
++ expected = {"cffi", "greenlet", "hpy", "pip", "readline", "setuptools", "wheel"}
++ else:
++ expected = {"cffi", "greenlet", "pip", "readline", "setuptools", "wheel"}
+ else:
+ raise ValueError(implementation)
+ if sys.version_info >= (3, 12):
+--
+2.44.0
+
diff --git a/dev-python/pipdeptree/pipdeptree-2.17.0.ebuild b/dev-python/pipdeptree/pipdeptree-2.17.0.ebuild
new file mode 100644
index 000000000000..d4b8329e97ea
--- /dev/null
+++ b/dev-python/pipdeptree/pipdeptree-2.17.0.ebuild
@@ -0,0 +1,51 @@
+# Copyright 2022-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+DISTUTILS_USE_PEP517=hatchling
+PYTHON_COMPAT=( pypy3 python3_{10..12} )
+
+inherit distutils-r1 pypi optfeature
+
+DESCRIPTION="Utility for displaying installed packages in a dependency tree"
+HOMEPAGE="
+ https://github.com/tox-dev/pipdeptree/
+ https://pypi.org/project/pipdeptree/
+"
+
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS="~amd64 ~arm64 ~riscv"
+
+RDEPEND="
+ >=dev-python/packaging-23.1[${PYTHON_USEDEP}]
+ >=dev-python/pip-23.1.2[${PYTHON_USEDEP}]
+"
+BDEPEND="
+ dev-python/hatch-vcs[${PYTHON_USEDEP}]
+ test? (
+ dev-python/graphviz[${PYTHON_USEDEP}]
+ dev-python/pytest-mock[${PYTHON_USEDEP}]
+ dev-python/virtualenv[${PYTHON_USEDEP}]
+ )
+"
+
+PATCHES=(
+ # https://github.com/tox-dev/pipdeptree/pull/302
+ "${FILESDIR}/pipdeptree-2.17.0-expect-hpy-in-pypy-7.3.3.patch"
+ "${FILESDIR}/pipdeptree-2.13.2-fix-pypy-7.3.14.patch"
+)
+
+distutils_enable_tests pytest
+
+python_test() {
+ local -x PYTEST_DISABLE_PLUGIN_AUTOLOAD=1
+ epytest -p pytest_mock
+}
+
+pkg_postinst() {
+ optfeature \
+ "visualising the dependency graph with --graph-output" \
+ dev-python/graphviz
+}
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-python/pipdeptree/files/, dev-python/pipdeptree/
@ 2024-05-28 4:42 Michał Górny
0 siblings, 0 replies; 3+ messages in thread
From: Michał Górny @ 2024-05-28 4:42 UTC (permalink / raw
To: gentoo-commits
commit: 165b74a6a1ca84e569326259dfe46db455c356df
Author: Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Tue May 28 04:36:44 2024 +0000
Commit: Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Tue May 28 04:41:13 2024 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=165b74a6
dev-python/pipdeptree: Bump to 2.21.0
Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>
dev-python/pipdeptree/Manifest | 1 +
.../pipdeptree/files/pipdeptree-2.21.0-pypy.patch | 134 +++++++++++++++++++++
dev-python/pipdeptree/pipdeptree-2.21.0.ebuild | 51 ++++++++
3 files changed, 186 insertions(+)
diff --git a/dev-python/pipdeptree/Manifest b/dev-python/pipdeptree/Manifest
index 88b46781bb9a..b6d8e483130c 100644
--- a/dev-python/pipdeptree/Manifest
+++ b/dev-python/pipdeptree/Manifest
@@ -1,2 +1,3 @@
DIST pipdeptree-2.16.2.tar.gz 32151 BLAKE2B 18715b0c7835e19bd5b6846922990e321a7e06315642204e7d79375a50b692f87e2ba1ec5884c4f69ff6e8d75e863c8cf372152aca7561ab94ef265d3c1df9fb SHA512 06d72f94a9165fe52cc15b9f539e3adb6da99e4a63cae78928bf68be3499b2828a5d471f270455b94a960ba2fe2f6319f5319c20ed270029a38a81173a7cd403
DIST pipdeptree-2.17.0.tar.gz 34677 BLAKE2B 3f92c4361978d2a6b1ae46d3a7e21aca231d504abf3a3cc8388d64a70fc3853a33edeac091a0b60cd3043d86162f6816292f973e9c8691420f906e946a5c9dac SHA512 1e7a4bc7f2f872e9d3115b413acc791eeb912a6f428fca772e30a3c8164ecfa44bba7e5246f9b65cbc4d34ffcd8050ff795ced3e3f9ad918f134ce052a8e8992
+DIST pipdeptree-2.21.0.tar.gz 39119 BLAKE2B 15f37f997b89477a9e1815a2bf120ce5251e9cf2e4df9195dc76bd7414c0cf7f58c4b8e787649492c9826bda5d3f8df60577b5242af7354ad0e1583eabbf0589 SHA512 3d416683c70861de7b768a69fe59a31173e712ecb752c7948329f787c8e13bc54be544fa4a7d3bfdbf6b164202fa8b07898c6e993a53fe244a5f3d9fa9a00573
diff --git a/dev-python/pipdeptree/files/pipdeptree-2.21.0-pypy.patch b/dev-python/pipdeptree/files/pipdeptree-2.21.0-pypy.patch
new file mode 100644
index 000000000000..bbc8ea9d0b9c
--- /dev/null
+++ b/dev-python/pipdeptree/files/pipdeptree-2.21.0-pypy.patch
@@ -0,0 +1,134 @@
+diff --git a/tests/test_non_host.py b/tests/test_non_host.py
+index 7049b0c..54ba7fb 100644
+--- a/tests/test_non_host.py
++++ b/tests/test_non_host.py
+@@ -16,6 +16,21 @@
+ from pytest_mock import MockerFixture
+
+
++@pytest.fixture(scope="session")
++def expected_venv_pkgs() -> frozenset[str]:
++ implementation = python_implementation()
++ if implementation == "CPython": # pragma: cpython cover
++ expected = {"pip", "setuptools", "wheel"}
++ elif implementation == "PyPy": # pragma: pypy cover
++ expected = {"cffi", "greenlet", "pip", "readline", "hpy", "setuptools", "wheel"}
++ else: # pragma: no cover
++ raise ValueError(implementation)
++ if sys.version_info >= (3, 12): # pragma: >=3.12 cover
++ expected -= {"setuptools", "wheel"}
++
++ return frozenset(expected)
++
++
+ @pytest.mark.parametrize("args_joined", [True, False])
+ def test_custom_interpreter(
+ tmp_path: Path,
+@@ -23,6 +38,7 @@ def test_custom_interpreter(
+ monkeypatch: pytest.MonkeyPatch,
+ capfd: pytest.CaptureFixture[str],
+ args_joined: bool,
++ expected_venv_pkgs: frozenset[str],
+ ) -> None:
+ # Delete $PYTHONPATH so that it cannot be passed to the custom interpreter process (since we don't know what
+ # distribution metadata to expect when it's used).
+@@ -32,20 +48,13 @@ def test_custom_interpreter(
+ result = virtualenv.cli_run([str(tmp_path / "venv"), "--activators", ""])
+ py = str(result.creator.exe.relative_to(tmp_path))
+ cmd = ["", f"--python={result.creator.exe}"] if args_joined else ["", "--python", py]
++ cmd += ["--all", "--depth", "0"]
+ mocker.patch("pipdeptree._discovery.sys.argv", cmd)
+ main()
+ out, _ = capfd.readouterr()
+ found = {i.split("==")[0] for i in out.splitlines()}
+- implementation = python_implementation()
+- if implementation == "CPython":
+- expected = {"pip", "setuptools", "wheel"}
+- elif implementation == "PyPy":
+- expected = {"cffi", "greenlet", "pip", "readline", "setuptools", "wheel"} # pragma: no cover
+- else:
+- raise ValueError(implementation)
+- if sys.version_info >= (3, 12):
+- expected -= {"setuptools", "wheel"}
+- assert found == expected, out
++
++ assert expected_venv_pkgs == found, out
+
+
+ def test_custom_interpreter_with_local_only(
+@@ -54,7 +63,6 @@ def test_custom_interpreter_with_local_only(
+ capfd: pytest.CaptureFixture[str],
+ ) -> None:
+ venv_path = str(tmp_path / "venv")
+-
+ result = virtualenv.cli_run([venv_path, "--system-site-packages", "--activators", ""])
+
+ cmd = ["", f"--python={result.creator.exe}", "--local-only"]
+@@ -63,16 +71,10 @@ def test_custom_interpreter_with_local_only(
+ main()
+ out, _ = capfd.readouterr()
+ found = {i.split("==")[0] for i in out.splitlines()}
+- implementation = python_implementation()
+- if implementation == "CPython":
+- expected = {"pip", "setuptools", "wheel"}
+- elif implementation == "PyPy": # pragma: no cover
+- expected = {"cffi", "greenlet", "pip", "readline", "setuptools", "wheel"} # pragma: no cover
+- else:
+- raise ValueError(implementation) # pragma: no cover
+- if sys.version_info >= (3, 12):
+- expected -= {"setuptools", "wheel"} # pragma: no cover
+- assert found == expected, out
++ expected = {"pip", "setuptools", "wheel"}
++ if sys.version_info >= (3, 12): # pragma: >=3.12 cover
++ expected -= {"setuptools", "wheel"}
++ assert expected == found, out
+
+
+ def test_custom_interpreter_with_user_only(
+@@ -81,7 +83,6 @@ def test_custom_interpreter_with_user_only(
+ # ensures there is no output when --user-only and --python are passed
+
+ venv_path = str(tmp_path / "venv")
+-
+ result = virtualenv.cli_run([venv_path, "--activators", ""])
+
+ cmd = ["", f"--python={result.creator.exe}", "--user-only"]
+@@ -127,7 +128,7 @@ def test_custom_interpreter_with_user_only_and_system_site_pkgs_enabled(
+ found = {i.split("==")[0] for i in out.splitlines()}
+ expected = {"bar"}
+
+- assert found == expected
++ assert expected == found
+
+
+ def test_custom_interpreter_ensure_pythonpath_envar_is_honored(
+@@ -135,6 +136,7 @@ def test_custom_interpreter_ensure_pythonpath_envar_is_honored(
+ mocker: MockerFixture,
+ monkeypatch: pytest.MonkeyPatch,
+ capfd: pytest.CaptureFixture[str],
++ expected_venv_pkgs: frozenset[str],
+ ) -> None:
+ # ensures that we honor $PYTHONPATH when passing it to the custom interpreter process
+ venv_path = str(tmp_path / "venv")
+@@ -146,19 +148,10 @@ def test_custom_interpreter_ensure_pythonpath_envar_is_honored(
+ fake_metadata = fake_dist / "METADATA"
+ with fake_metadata.open("w") as f:
+ f.write("Metadata-Version: 2.3\n" "Name: foo\n" "Version: 1.2.3\n")
+- cmd = ["", f"--python={result.creator.exe}"]
++ cmd = ["", f"--python={result.creator.exe}", "--all", "--depth", "0"]
+ mocker.patch("pipdeptree._discovery.sys.argv", cmd)
+ monkeypatch.setenv("PYTHONPATH", str(another_path))
+ main()
+ out, _ = capfd.readouterr()
+ found = {i.split("==")[0] for i in out.splitlines()}
+- implementation = python_implementation()
+- if implementation == "CPython":
+- expected = {"foo", "pip", "setuptools", "wheel"}
+- elif implementation == "PyPy": # pragma: cpython no cover
+- expected = {"foo", "cffi", "greenlet", "pip", "readline", "setuptools", "wheel"}
+- else: # pragma: no cover
+- raise ValueError(implementation)
+- if sys.version_info >= (3, 12): # pragma: >=3.12 cover
+- expected -= {"setuptools", "wheel"}
+- assert found == expected, out
++ assert {*expected_venv_pkgs, "foo"} == found, out
diff --git a/dev-python/pipdeptree/pipdeptree-2.21.0.ebuild b/dev-python/pipdeptree/pipdeptree-2.21.0.ebuild
new file mode 100644
index 000000000000..ff041b350662
--- /dev/null
+++ b/dev-python/pipdeptree/pipdeptree-2.21.0.ebuild
@@ -0,0 +1,51 @@
+# Copyright 2022-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+DISTUTILS_USE_PEP517=hatchling
+PYTHON_COMPAT=( pypy3 python3_{10..12} )
+
+inherit distutils-r1 pypi optfeature
+
+DESCRIPTION="Utility for displaying installed packages in a dependency tree"
+HOMEPAGE="
+ https://github.com/tox-dev/pipdeptree/
+ https://pypi.org/project/pipdeptree/
+"
+
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS="~amd64 ~arm64 ~riscv"
+
+RDEPEND="
+ >=dev-python/packaging-23.1[${PYTHON_USEDEP}]
+ >=dev-python/pip-23.1.2[${PYTHON_USEDEP}]
+"
+BDEPEND="
+ dev-python/hatch-vcs[${PYTHON_USEDEP}]
+ test? (
+ dev-python/graphviz[${PYTHON_USEDEP}]
+ >=dev-python/pytest-console-scripts-1.4.1[${PYTHON_USEDEP}]
+ dev-python/pytest-mock[${PYTHON_USEDEP}]
+ dev-python/virtualenv[${PYTHON_USEDEP}]
+ )
+"
+
+PATCHES=(
+ # https://github.com/tox-dev/pipdeptree/pull/369
+ "${FILESDIR}/${P}-pypy.patch"
+)
+
+distutils_enable_tests pytest
+
+python_test() {
+ local -x PYTEST_DISABLE_PLUGIN_AUTOLOAD=1
+ epytest -p pytest_mock -p console-scripts
+}
+
+pkg_postinst() {
+ optfeature \
+ "visualising the dependency graph with --graph-output" \
+ dev-python/graphviz
+}
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-python/pipdeptree/files/, dev-python/pipdeptree/
@ 2024-08-15 13:41 Petr Vaněk
0 siblings, 0 replies; 3+ messages in thread
From: Petr Vaněk @ 2024-08-15 13:41 UTC (permalink / raw
To: gentoo-commits
commit: ce229874b1a5340b2c6f933af3d49ef8a1ff8c28
Author: Oz Tiram <oz.tiram <AT> gmail <DOT> com>
AuthorDate: Thu Aug 15 10:17:35 2024 +0000
Commit: Petr Vaněk <arkamar <AT> gentoo <DOT> org>
CommitDate: Thu Aug 15 13:40:30 2024 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ce229874
dev-python/pipdeptree: fix import from pip._vendor
add dev-python/pytest-console-scripts
pass -p to epytest
Closes: https://bugs.gentoo.org/937953
Signed-off-by: Oz Tiram <oz.tiram <AT> gmail.com>
Signed-off-by: Petr Vaněk <arkamar <AT> gentoo.org>
.../files/pipdeptree-2.18.1-fix-pypy-7.3.14.patch | 16 ++++++++++++----
dev-python/pipdeptree/pipdeptree-2.18.1.ebuild | 10 +++++++++-
2 files changed, 21 insertions(+), 5 deletions(-)
diff --git a/dev-python/pipdeptree/files/pipdeptree-2.18.1-fix-pypy-7.3.14.patch b/dev-python/pipdeptree/files/pipdeptree-2.18.1-fix-pypy-7.3.14.patch
index 6179d823a021..32d039fed519 100644
--- a/dev-python/pipdeptree/files/pipdeptree-2.18.1-fix-pypy-7.3.14.patch
+++ b/dev-python/pipdeptree/files/pipdeptree-2.18.1-fix-pypy-7.3.14.patch
@@ -1,6 +1,15 @@
---- a/tests/test_non_host.py 2024-06-12 21:33:13.696206671 +0200
-+++ b/tests/test_non_host.py 2024-06-12 21:46:40.146193582 +0200
-@@ -32,10 +32,10 @@
+diff --git a/tests/test_non_host.py b/tests/test_non_host.py
+index 2849375..ed7b7b3 100644
+--- a/tests/test_non_host.py
++++ b/tests/test_non_host.py
+@@ -1,5 +1,6 @@
+ from __future__ import annotations
+
++import json
+ import sys
+ from platform import python_implementation
+ from typing import TYPE_CHECKING
+@@ -31,10 +32,10 @@ def test_custom_interpreter(
result = virtualenv.cli_run([str(tmp_path / "venv"), "--activators", ""])
py = str(result.creator.exe.relative_to(tmp_path))
cmd = ["", f"--python={result.creator.exe}"] if args_joined else ["", "--python", py]
@@ -13,4 +22,3 @@
implementation = python_implementation()
if implementation == "CPython":
expected = {"pip", "setuptools", "wheel"}
-
diff --git a/dev-python/pipdeptree/pipdeptree-2.18.1.ebuild b/dev-python/pipdeptree/pipdeptree-2.18.1.ebuild
index 3cd1aa8e171f..b99c9659bda4 100644
--- a/dev-python/pipdeptree/pipdeptree-2.18.1.ebuild
+++ b/dev-python/pipdeptree/pipdeptree-2.18.1.ebuild
@@ -26,6 +26,7 @@ BDEPEND="
dev-python/hatch-vcs[${PYTHON_USEDEP}]
test? (
dev-python/graphviz[${PYTHON_USEDEP}]
+ >=dev-python/pytest-console-scripts-1.4.1[${PYTHON_USEDEP}]
dev-python/pytest-mock[${PYTHON_USEDEP}]
dev-python/virtualenv[${PYTHON_USEDEP}]
)
@@ -39,9 +40,16 @@ 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
+ epytest -p pytest_mock -p console-scripts
}
pkg_postinst() {
^ permalink raw reply related [flat|nested] 3+ messages in thread
end of thread, other threads:[~2024-08-15 13:41 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-08-15 13:41 [gentoo-commits] repo/gentoo:master commit in: dev-python/pipdeptree/files/, dev-python/pipdeptree/ Petr Vaněk
-- strict thread matches above, loose matches on Subject: below --
2024-05-28 4:42 Michał Górny
2024-04-06 14:42 Michał Górny
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox