summaryrefslogtreecommitdiff
path: root/dev-python/pipdeptree
diff options
context:
space:
mode:
Diffstat (limited to 'dev-python/pipdeptree')
-rw-r--r--dev-python/pipdeptree/Manifest3
-rw-r--r--dev-python/pipdeptree/files/pipdeptree-2.21.0-pypy.patch134
-rw-r--r--dev-python/pipdeptree/pipdeptree-2.21.0.ebuild51
3 files changed, 188 insertions, 0 deletions
diff --git a/dev-python/pipdeptree/Manifest b/dev-python/pipdeptree/Manifest
index 408cb7fd5e2c..b00a1552a122 100644
--- a/dev-python/pipdeptree/Manifest
+++ b/dev-python/pipdeptree/Manifest
@@ -1,8 +1,11 @@
AUX pipdeptree-2.13.1-expect-hpy-in-pypy-7.3.3.patch 1018 BLAKE2B 18405bf1f1ba5a457c9643738258df5d1c3d5ed709954dd274560ae9cbf139f336b75b2c896d9d8bdfe24c4d2cb98ea3e0391d73ac05ba1e38766f2cfa04a431 SHA512 da732fe18cc3f49ed3994133e8a5eefe4c6f8ebf18dad3caeb057bcdbab38f5936c245271d6ff534f3cb6069255e13291a9033594148e70e486fd85d5b9e711e
AUX pipdeptree-2.13.2-fix-pypy-7.3.14.patch 1353 BLAKE2B 5e3a6f53244de1ae185818e3e2a37a87229b46b02c390a606b65668ae1dc53fe1a6b5e6c9faaf6160f25adc7e2597cceb5fd89bb20414a609880e034c7bdc026 SHA512 e0e8e729d713d347c96ee7db5e6a14ba7a9a986aa41231731973b4ab31f8d866cd4d229b35b54411e171a446d61201675ab3df01a58079786eabf5a080de05ad
AUX pipdeptree-2.17.0-expect-hpy-in-pypy-7.3.3.patch 1170 BLAKE2B e214c79ba1183222d00525e0e795d2ba1f10a3abb1ff6e5c986ba3aa036251326d8244787f549d698ab6a015f79eb2397212060365b8c774e2d1218531f8704d SHA512 a2055d9c828352aa1d2d5ec844acf00bc202a579c2dcf7f27997ac29261680ebee0f674b42eca77c3e039ccbc482eac62adfbb82190e157e65b01755d4972f62
+AUX pipdeptree-2.21.0-pypy.patch 5682 BLAKE2B f545f7dae932b98e472ec3d4d47cf2538cff50be34257c8c97761096c6e1b3e8664759d5a40a275951591b30b1546d34ccb71afb5f4006951508bfe6707bca6d SHA512 23896b56e93faa64943ebccece52ea5145236ed3670dd962e5f0c74dde4d091c41695fe4300c8f4529bfd2d669d1ce154c01c079dd5708ba8c21de0ee28098e9
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
EBUILD pipdeptree-2.16.2.ebuild 1107 BLAKE2B 1587d84842ffc3fafe93bfaf51beb7a042d1cbd738598372366115ac16fe57788cf3df0434887358ca900cd8408da73b550f202eec0887552d21bf3904f60c80 SHA512 9c699f5a6a2a3f1861f378f42060ac5e055c7839da44b2bf515e69c917580d97e9c155cce8567199ee425985b75456f055f218c48468b318bd29839aef106773
EBUILD pipdeptree-2.17.0.ebuild 1154 BLAKE2B a2a156605e25f6446f528ad41af50cf3e8db05c0ea1ff01dd3e4d4b9a7ab826fc5d62b016db5cfeda26021b23e94bab5b0096070bf4a7b75ace9c4b72692486d SHA512 031d9cace0407b032e372e2c76c9cc6a08e75f30a6012b0a9757e7ed3ad0cef945a1278b46b6a8f27dd2bf928f73c52ef6436f14b7c9a718419a980c1faa120c
+EBUILD pipdeptree-2.21.0.ebuild 1147 BLAKE2B ba5283c5f9a0e1b2a8f710fe77dedd016a051571ea3f8fa64e370e91fb0acaa2415733eb7877a9263f50e5455e1a81ec3b6b0cc8d08aca05a839af1a90a826c5 SHA512 cf2965fe240c7a650ded12d07074f9a7b30b3cbc2395a5f83270127d95379f5df024d5fd97bf86976afe7385555eb8d5f38babcd9e7bd2d4b10365848964835e
MISC metadata.xml 545 BLAKE2B cf435473fd95ac0a5bafe2b52ddd78e09c16eb190e3a979924525607fc7ab152e249419e3a21d246cd1354a714116c6c0953ed55d1efceafae441ee282c2b1eb SHA512 ad2e8d4e7bac53b26ea0bb5c2f65e0c9dc8d30afc8c569d73bac820b2dda6a343b96e52abd0353e3f50269fb431e46bd3b51b3768d9c24f658fd2eca6cc1ce97
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..dae7c7c1be5b
--- /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..13} )
+
+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
+}