From 4f2d7949f03e1c198bc888f2d05f421d35c57e21 Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Mon, 9 Oct 2017 18:53:29 +0100 Subject: reinit the tree, so we can have metadata --- dev-python/pycallgraph/Manifest | 6 ++ dev-python/pycallgraph/files/python3.3-tests.patch | 87 ++++++++++++++++++++++ dev-python/pycallgraph/metadata.xml | 11 +++ dev-python/pycallgraph/pycallgraph-1.0.1.ebuild | 69 +++++++++++++++++ 4 files changed, 173 insertions(+) create mode 100644 dev-python/pycallgraph/Manifest create mode 100644 dev-python/pycallgraph/files/python3.3-tests.patch create mode 100644 dev-python/pycallgraph/metadata.xml create mode 100644 dev-python/pycallgraph/pycallgraph-1.0.1.ebuild (limited to 'dev-python/pycallgraph') diff --git a/dev-python/pycallgraph/Manifest b/dev-python/pycallgraph/Manifest new file mode 100644 index 000000000000..f6517524b033 --- /dev/null +++ b/dev-python/pycallgraph/Manifest @@ -0,0 +1,6 @@ +AUX python3.3-tests.patch 3268 SHA256 befac3ffb7f568f4f33170c740c4e6fb59f9d4596cf874145c8d1922e69e8fc5 SHA512 274b3af41f80058e1bbacf681b8f2ca7e09069dfb7f0a333cfc7ad417a1a88e738abb0d0ad340ab1b342076b7f331977617dce8b46bcd6e158764ffc09ee6a94 WHIRLPOOL 12bdb91bfb105a6f50e4d92a190d31e7ead0180c809f774ce7dd79ab008f20604e0c5b7640974897a18e55c8bb90ef63282510f63fa06f909261423648ed4371 +DIST pycallgraph-1.0.1.tar.gz 458254 SHA256 1ee59de9c9bfbaa51613546103ef7923c644bbc92bce2b7df563522a7c9bd3a8 SHA512 75a20cd8c50f070c961466f89b70384c914129c8ffcbca3ffde8c4729cd5f8a3dc94c4a33d54990e5cb9e502ccd1038c64e878da84cf832065fe4ece74356e2e WHIRLPOOL a6ce038bc6529dca3e6d3b11f95d7ee521785c3ae32356bb95dfad1a3bf8830a240b51f53ca9c801534750dae16b5f14eeda625c045b2db516c8bc88aa760405 +EBUILD pycallgraph-1.0.1.ebuild 1822 SHA256 2858339e72a3672bec5f4290f9afc4b09f610449f457f7f4dc615cbe5f6dec01 SHA512 f061b54300fb2ac8b8204f4d9acd36737efb02a7fba1ff2ceb24c68f881a07ea30d94eb1c2f169193f30000402889a35894ca1f7e1fb79c4eae1b4808bc62355 WHIRLPOOL b59eaa0c5c028c542996a4eb8a16a3867d41be758d6fdb0a0d844794cc741a1344978f8d403bb1b661142e56a740bd086f779e62d73767127621b443158510e5 +MISC ChangeLog 2352 SHA256 7fe93caef3da7e2a209f6fea1c10fb1088a5a38dd9b17e0f321344dbc0dd2ddb SHA512 c642b624342a8e6431acbbe73847445b6270418964c8bd555c9093830663ec5afcff1c8458e059fdb6725949633e36b1ac960eed658464011f915cc774173c2a WHIRLPOOL 04a59071e0999f439a26a529bc959485d7e69c081a612dadc7cba1c27f74836d4b7f1a3e69a03eed2244ef390262b29289b20fa564252067e6b93f5ff92af10f +MISC ChangeLog-2015 843 SHA256 d281841559b333fe53397fb83f65a9e0aea4070af5465640942e0cc8904e7e92 SHA512 f1a40244a8056c8a1a06c1196b2b14269429084fc15a85b12ed7acb035bb5c2adbc36aea1cf3cdf4ebc9550580aec58d9a886d877b2becfd0715c7576906fd5b WHIRLPOOL 820bc92df0d22f347508512ef0b0d0635cc8b50f05a62f4d363de9f6f595357d53be202cb8b5938e6d3c2c865f75808c7de9382ef84a24d7b583ffa64ffd4380 +MISC metadata.xml 326 SHA256 c9acc386b268afc9f6d8b4e427c913db11890248567b3be9c810abee1bd0a428 SHA512 e2548723ad40698993a02d7a73a7e62046ab1ba7015a9641f240bd1080ff67f502324f3dee203341d26dfaf025d8aa2e106274489c6ec5940c94eecb8bb3feeb WHIRLPOOL 8322a3b43f98bdd7cca47610395beb2b3c82861315a6687595049f849fb94bd2b0480c2626c00e99532e6d7fa3bd277ea6158bddd945e60ae34996b5c6166883 diff --git a/dev-python/pycallgraph/files/python3.3-tests.patch b/dev-python/pycallgraph/files/python3.3-tests.patch new file mode 100644 index 000000000000..90f31a09ce4b --- /dev/null +++ b/dev-python/pycallgraph/files/python3.3-tests.patch @@ -0,0 +1,87 @@ +diff --git a/pycallgraph/config.py b/pycallgraph/config.py +index 5911fef..e3492c1 100755 +--- a/pycallgraph/config.py ++++ b/pycallgraph/config.py +@@ -34,7 +34,7 @@ class Config(object): + self.did_init = True + + # Update the defaults with anything from kwargs +- [setattr(self, k, v) for k, v in kwargs.iteritems()] ++ [setattr(self, k, v) for k, v in kwargs.items()] + + self.create_parser() + +diff --git a/pycallgraph/output/graphviz.py b/pycallgraph/output/graphviz.py +index 6f10049..d130d65 100644 +--- a/pycallgraph/output/graphviz.py ++++ b/pycallgraph/output/graphviz.py +@@ -148,7 +148,7 @@ class GraphvizOutput(Output): + + def attrs_from_dict(self, d): + output = [] +- for attr, val in d.iteritems(): ++ for attr, val in d.items(): + output.append('%s = "%s"' % (attr, val)) + return ', '.join(output) + +@@ -164,7 +164,7 @@ class GraphvizOutput(Output): + + def generate_attributes(self): + output = [] +- for section, attrs in self.graph_attributes.iteritems(): ++ for section, attrs in self.graph_attributes.items(): + output.append('{} [ {} ];'.format( + section, self.attrs_from_dict(attrs), + )) +diff --git a/pycallgraph/output/output.py b/pycallgraph/output/output.py +index 9660d58..48eef49 100644 +--- a/pycallgraph/output/output.py ++++ b/pycallgraph/output/output.py +@@ -16,14 +16,14 @@ class Output(object): + self.edge_label_func = self.edge_label + + # Update the defaults with anything from kwargs +- [setattr(self, k, v) for k, v in kwargs.iteritems()] ++ [setattr(self, k, v) for k, v in kwargs.items()] + + def set_config(self, config): + ''' + This is a quick hack to move the config variables set in Config into + the output module config variables. + ''' +- for k, v in config.__dict__.iteritems(): ++ for k, v in config.__dict__.items(): + if hasattr(self, k) and callable(getattr(self, k)): + continue + setattr(self, k, v) +diff --git a/pycallgraph/tracer.py b/pycallgraph/tracer.py +index 17e9286..74a1477 100644 +--- a/pycallgraph/tracer.py ++++ b/pycallgraph/tracer.py +@@ -297,7 +297,7 @@ class TraceProcessor(Thread): + grp = defaultdict(list) + for node in self.nodes(): + grp[self.group(node.name)].append(node) +- for g in grp.iteritems(): ++ for g in grp.items(): + yield g + + def stat_group_from_func(self, func, calls): +@@ -315,14 +315,14 @@ class TraceProcessor(Thread): + return stat_group + + def nodes(self): +- for func, calls in self.func_count.iteritems(): ++ for func, calls in self.func_count.items(): + yield self.stat_group_from_func(func, calls) + + def edges(self): +- for src_func, dests in self.call_dict.iteritems(): ++ for src_func, dests in self.call_dict.items(): + if not src_func: + continue +- for dst_func, calls in dests.iteritems(): ++ for dst_func, calls in dests.items(): + edge = self.stat_group_from_func(dst_func, calls) + edge.src_func = src_func + edge.dst_func = dst_func diff --git a/dev-python/pycallgraph/metadata.xml b/dev-python/pycallgraph/metadata.xml new file mode 100644 index 000000000000..a94530cad28e --- /dev/null +++ b/dev-python/pycallgraph/metadata.xml @@ -0,0 +1,11 @@ + + + + + alunduil@gentoo.org + Alex Brandt + + + gak/pycallgraph + + diff --git a/dev-python/pycallgraph/pycallgraph-1.0.1.ebuild b/dev-python/pycallgraph/pycallgraph-1.0.1.ebuild new file mode 100644 index 000000000000..62304425191f --- /dev/null +++ b/dev-python/pycallgraph/pycallgraph-1.0.1.ebuild @@ -0,0 +1,69 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=5 +PYTHON_COMPAT=( python2_7 python3_{4,5,6} ) + +inherit distutils-r1 vcs-snapshot + +DESCRIPTION="library and command line tool to visualise the flow of Python applications" +HOMEPAGE="http://pycallgraph.slowchop.com/" +SRC_URI="https://github.com/gak/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64" +IUSE="doc examples test" + +CDEPEND="media-gfx/graphviz" +DEPEND=" + dev-python/setuptools[${PYTHON_USEDEP}] + dev-python/sphinx[${PYTHON_USEDEP}] + doc? ( dev-python/pyyaml[${PYTHON_USEDEP}] ) + examples? ( dev-python/pyyaml[${PYTHON_USEDEP}] ) + test? ( + ${CDEPEND} + dev-python/pytest[${PYTHON_USEDEP}] + ) +" +RDEPEND="${CDEPEND}" + +python_prepare_all() { + local PATCHES=( + "${FILESDIR}"/python3.3-tests.patch + ) + + distutils-r1_python_prepare_all +} + +python_compile_all() { + if use examples; then + cd docs/examples || die "Couldn't change to docs/examples" + "${PYTHON}" generate.py || die "Couldn't generate examples" + cd - || die "Couldn't return to previous directory" + + cd docs/guide/filtering || die "Couldn't change to docs/guide/filtering" + "${PYTHON}" generate.py || die "Couldn't generate filtering examples" + cd - || die "Couldn't return to previous directory" + fi + + use doc && emake -C docs html + + emake -C docs man +} + +python_test() { + # gephi is not in portage; thus, skip the gephi tests + rm -f test/test_gephi.py || die "Couldn't remove gephi tests" + + py.test --ignore=pycallgraph/memory_profiler.py test pycallgraph examples || die "Tests failed under ${EPYTHON}" +} + +python_install_all() { + use doc && local HTML_DOCS=( docs/_build/html/. ) + use examples && local EXAMPLES=( examples/. ) + + distutils-r1_python_install_all + + doman docs/_build/man/pycallgraph.1 +} -- cgit v1.2.3