diff --git a/dev-python/objgraph/Manifest b/dev-python/objgraph/Manifest index e3104474d..cbaff58a5 100644 --- a/dev-python/objgraph/Manifest +++ b/dev-python/objgraph/Manifest @@ -1,3 +1,4 @@ +AUX objgraph-3.4.1-tests.patch 2708 BLAKE2B 2b2c78340c1be1c60fe3b43a671b1fab07bcb58275d90f59fca9dcc8bebdd52f5d6ed69455f9135647b27ed64d3251cb7d7b5f3da4e7b394bf45a45791b73c73 SHA512 8d8a43bcb75141a5fa278871d7e4e3b2ba1dcb833967a347f334675d6fa1a510d7f9abbcae82419617fc593ca02e1708ff69d9b4babe1d23e08d24814f9b564b DIST objgraph-3.4.1.tar.gz 634602 BLAKE2B 17424fa5b6b079e9b0dabdfb5facc88fef67bb3742252fd986b19cb0b674c40f335e0372cb08a86e89d42cce0d504830c24471e0d34483925b33d44f45859445 SHA512 174e097cd9f9b5bd2e83a389d2ce3bd05a1754c1535923cc75f59a3281a292b50014501f093ccf1b2350fdbb34757af950636819227e39cdad2f64cb7de5ebb8 -EBUILD objgraph-3.4.1.ebuild 732 BLAKE2B 7c584aeac142301652164380d62c2a6de3ebf5550ffc22e9ed54a7785a32b748a6794dac4781f0ead27e470280aac26070527a0be92c3cc88204fa15760d2b2e SHA512 849f3464a578a0d4e42332caec6d9e4b261034c05a1ea7cb3b533d23a86a9e08fa320c47ee779ef45fecdf4346b1849f06fe5938a6ae4ccebda9199d3402a6c3 -MISC metadata.xml 452 BLAKE2B 4219c45edf6e491f43d17579ad784d0639be00a7d6b6c0f8b1a2dddd680a489e679303e996400fbea6383f171ee01815b2cdb5abd03ed592d680de523cab5028 SHA512 b0ac7ebb0993ccf80fe81c006223d8ebeabc3edbe58bdcd1caf43b31bb97f924421f3f6d8b5b09a523cbedada2e68b31815c62864b86aa4a27fc3bcc2beb8657 +EBUILD objgraph-3.4.1.ebuild 681 BLAKE2B 10640d6919f8c5e0c5db51977c1a5e2526d86c43221df63424567a2e458d84c611f70c4a238ed1bc61aee25ee143c0f5057bece372e2e90bb1396abc41efed70 SHA512 afc62ad12bb7925dd2bc68092eb0c9c339e1ee491921919007581193b0cad6848b14af8698f9412514bf4338b08489ecf85b6e5d592b534f3bd8d069068efc9e +MISC metadata.xml 349 BLAKE2B 6027c339cb5596f31c245e4b29b04e32226fecd7959db0ef177701b3d0580e43f05e338a44c6b328ddd8d520bacc9c7b8251d642ee3c9ab7c97a926eb0b56bb9 SHA512 4348dc0ecb04ee53b4d2c15cefa3ec4077a9de4126a67789505f940eea83df865c5222b4a3436605ba24c900374be393d67746020cec2b747687d785f3c892d9 diff --git a/dev-python/objgraph/files/objgraph-3.4.1-tests.patch b/dev-python/objgraph/files/objgraph-3.4.1-tests.patch new file mode 100644 index 000000000..d79b78fb8 --- /dev/null +++ b/dev-python/objgraph/files/objgraph-3.4.1-tests.patch @@ -0,0 +1,57 @@ +diff --git a/tests.py b/tests.py +index fc2ee7f..d494470 100755 +--- a/tests.py ++++ b/tests.py +@@ -11,6 +11,7 @@ import tempfile + import textwrap + import types + import unittest ++import platform + + # setuptools imports `imp`, which triggers a DeprecationWarning starting with + # Python 3.4 in the middle of my pristine test suite. But if I do the import +@@ -363,7 +364,7 @@ def doctest_get_new_ids_prints(): + ======================================================== + Type Old_ids Current_ids New_ids Count_Deltas + ======================================================== +- list ... ... ... +2 ++ wt ... ... ... +2 + ======================================================== + + """ +@@ -387,7 +388,10 @@ class ByTypeTest(GarbageCollectedMixin, unittest.TestCase): + # 2. the `res` list + # referrers we don't want: + # the ``objects`` list in the now-dead stack frame of objgraph.by_type +- self.assertLessEqual(len(gc.get_referrers(res[0])), 2) ++ if 'pypy' in platform.python_implementation().lower(): ++ self.assertLessEqual(len(gc.get_referrers(res[0])), 3) ++ else: ++ self.assertLessEqual(len(gc.get_referrers(res[0])), 2) + + + class AtAddrsTest(unittest.TestCase): +@@ -439,7 +443,10 @@ class StringRepresentationTest(GarbageCollectedMixin, + obj = MyClass() + with mock.patch.object(obj, 'my_method', + types.MethodType(mock_method, obj)): +- self.assertRegex(objgraph._short_repr(obj.my_method), ' 2, "Python 3 has no unbound methods") + def test_short_repr_unbound_method(self): diff --git a/dev-python/objgraph/metadata.xml b/dev-python/objgraph/metadata.xml index c2cd6f101..7a6162fdb 100644 --- a/dev-python/objgraph/metadata.xml +++ b/dev-python/objgraph/metadata.xml @@ -1,15 +1,12 @@ - - + + - - b@edevau.net - Andreas Billmeier + + heroxbd@gentoo.org + Benda Xu + objgraph - - marius@gedmin.as - Marius Gedminas - diff --git a/dev-python/objgraph/objgraph-3.4.1.ebuild b/dev-python/objgraph/objgraph-3.4.1.ebuild index e330e7c4e..52a0b40de 100644 --- a/dev-python/objgraph/objgraph-3.4.1.ebuild +++ b/dev-python/objgraph/objgraph-3.4.1.ebuild @@ -1,33 +1,31 @@ # Copyright 1999-2020 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 -EAPI="7" +EAPI=7 -PYTHON_COMPAT=( python3_{6..8} ) +PYTHON_COMPAT=( python3_{6..9} pypy3 ) inherit distutils-r1 DESCRIPTION="Draws Python object reference graphs with graphviz" -HOMEPAGE="https://mg.pov.lt/objgraph/ https://pypi.org/project/objgraph/" -SRC_URI="mirror://pypi/${P:0:1}/${PN}/${P}.tar.gz" +HOMEPAGE="https://mg.pov.lt/objgraph/" +SRC_URI="mirror://pypi/o/${PN}/${P}.tar.gz" LICENSE="MIT" +KEYWORDS="amd64 arm arm64 ~ia64 ppc ~ppc64 x86 ~amd64-linux ~x86-linux" SLOT="0" -KEYWORDS="~amd64 ~arm ~arm64 ~x86 ~amd64-linux ~x86-linux" -IUSE="test" -RESTRICT="!test? ( test )" +IUSE="doc" -DOCS="README.rst" +RDEPEND="media-gfx/graphviz" +BDEPEND="test? ( media-gfx/xdot )" -RDEPEND="" -BDEPEND="${REDEPEND} - dev-python/setuptools[${PYTHON_USEDEP}] - test? ( - dev-python/nose[${PYTHON_USEDEP}] - dev-python/pytest[${PYTHON_USEDEP}] - )" +PATCHES=( + "${FILESDIR}/objgraph-3.4.1-tests.patch" +) -python_test() { - nosetests --verbose || die - py.test -v -v || die +distutils_enable_tests unittest + +python_install_all() { + use doc && local HTML_DOCS=( docs/* ) + distutils-r1_python_install_all }