diff options
author | Alfred Wingate <parona@protonmail.com> | 2024-02-08 15:57:11 +0200 |
---|---|---|
committer | Michał Górny <mgorny@gentoo.org> | 2024-02-08 15:32:31 +0100 |
commit | 613e7f29a889fe2afdfdb0b8011c59285ea2b3e8 (patch) | |
tree | 7d7e13f37377dbb504260a8a666d032343d75fd6 /dev-python/pipdeptree | |
parent | dev-ruby/rspec-core: add 3.12.3 (diff) | |
download | gentoo-613e7f29a889fe2afdfdb0b8011c59285ea2b3e8.tar.gz gentoo-613e7f29a889fe2afdfdb0b8011c59285ea2b3e8.tar.bz2 gentoo-613e7f29a889fe2afdfdb0b8011c59285ea2b3e8.zip |
dev-python/pipdeptree: add 2.13.2
Bug: https://bugs.gentoo.org/923893
Closes: https://bugs.gentoo.org/923926
Signed-off-by: Alfred Wingate <parona@protonmail.com>
Closes: https://github.com/gentoo/gentoo/pull/35228
Signed-off-by: Michał Górny <mgorny@gentoo.org>
Diffstat (limited to 'dev-python/pipdeptree')
-rw-r--r-- | dev-python/pipdeptree/Manifest | 1 | ||||
-rw-r--r-- | dev-python/pipdeptree/files/pipdeptree-2.13.2-fix-pypy-7.3.14.patch | 37 | ||||
-rw-r--r-- | dev-python/pipdeptree/pipdeptree-2.13.2.ebuild | 43 |
3 files changed, 81 insertions, 0 deletions
diff --git a/dev-python/pipdeptree/Manifest b/dev-python/pipdeptree/Manifest index d8713f22e65d..21b7d62ce204 100644 --- a/dev-python/pipdeptree/Manifest +++ b/dev-python/pipdeptree/Manifest @@ -1 +1,2 @@ DIST pipdeptree-2.13.1.tar.gz 33139 BLAKE2B e7044303f09ad3952e14f79ec11e01a54e9c34ff5b4430094a968602c8a97388eadd4e021c97c97c1767d7ae02b7070ff6e4ec934aef6036b98bf2553d2344a0 SHA512 18c73a8ef458b0a241d967da40453fb8a9fc6550cbd2c21eecca9a81f011b896622fb45a81b79e30eb990454b6f518a1fcc02cb25bb2c5ca988b44e040264e26 +DIST pipdeptree-2.13.2.tar.gz 33290 BLAKE2B 1b97dbfaa6f6baff272e6e6d5399f95b96e13b19bba5ef3997574d027002abd98152e26d67b4b19555392d076c84bf6b142d147d95349ba1dd535bea40994b4f SHA512 ce6cfc29827c087725366a95079621516303cf50c6c4ee4a0cd5d8b7649e8dd7b7145b62523c48731a2b5f4140c90c558eb5d1a0248b28a8c4c97ccb78d9e16d diff --git a/dev-python/pipdeptree/files/pipdeptree-2.13.2-fix-pypy-7.3.14.patch b/dev-python/pipdeptree/files/pipdeptree-2.13.2-fix-pypy-7.3.14.patch new file mode 100644 index 000000000000..3718174d0af6 --- /dev/null +++ b/dev-python/pipdeptree/files/pipdeptree-2.13.2-fix-pypy-7.3.14.patch @@ -0,0 +1,37 @@ +https://bugs.gentoo.org/923893 + +From 5d111ebe3bb1d24baa314b615d67d3e3928297ca Mon Sep 17 00:00:00 2001 +From: Alfred Wingate <parona@protonmail.com> +Date: Wed, 7 Feb 2024 08:47:03 +0200 +Subject: [PATCH] Use json output for test which parses installed packages + +* pypy bundles hpy which has a dependency on setuptools, therefore + breaking non-json output due sub-dependency pretty printing. +* Using json makes parsing dependencies straight forward. + +Signed-off-by: Alfred Wingate <parona@protonmail.com> +--- 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 +@@ -25,10 +26,10 @@ def test_custom_interpreter( + monkeypatch.chdir(tmp_path) + py = str(result.creator.exe.relative_to(tmp_path)) + cmd += [f"--python={result.creator.exe}"] if args_joined else ["--python", py] +- monkeypatch.setattr(sys, "argv", cmd) ++ monkeypatch.setattr(sys, "argv", [*cmd, "-j"]) + main() + out, _ = capfd.readouterr() +- found = {i.split("==")[0] for i in out.splitlines()} ++ found = {i["package"]["package_name"] for i in json.loads(out)} + implementation = python_implementation() + if implementation == "CPython": + expected = {"pip", "setuptools", "wheel"} +-- +2.43.0 + diff --git a/dev-python/pipdeptree/pipdeptree-2.13.2.ebuild b/dev-python/pipdeptree/pipdeptree-2.13.2.ebuild new file mode 100644 index 000000000000..88a5c229f6a9 --- /dev/null +++ b/dev-python/pipdeptree/pipdeptree-2.13.2.ebuild @@ -0,0 +1,43 @@ +# 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" + +BDEPEND=" + dev-python/hatch-vcs[${PYTHON_USEDEP}] + test? ( + dev-python/graphviz[${PYTHON_USEDEP}] + dev-python/pip[${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.13.1-expect-hpy-in-pypy-7.3.3.patch" + "${FILESDIR}/pipdeptree-2.13.2-fix-pypy-7.3.14.patch" +) + +distutils_enable_tests pytest + +pkg_postinst() { + optfeature \ + "visualising the dependency graph with --graph-output" \ + dev-python/graphviz +} |