diff options
author | V3n3RiX <venerix@redcorelinux.org> | 2018-07-14 21:03:06 +0100 |
---|---|---|
committer | V3n3RiX <venerix@redcorelinux.org> | 2018-07-14 21:03:06 +0100 |
commit | 8376ef56580626e9c0f796d5b85b53a0a1c7d5f5 (patch) | |
tree | 7681bbd4e8b05407772df40a4bf04cbbc8afc3fa /dev-python/pycallgraph | |
parent | 30a9caf154332f12ca60756e1b75d2f0e3e1822d (diff) |
gentoo resync : 14.07.2018
Diffstat (limited to 'dev-python/pycallgraph')
-rw-r--r-- | dev-python/pycallgraph/Manifest | 4 | ||||
-rw-r--r-- | dev-python/pycallgraph/files/python3.3-tests.patch | 87 | ||||
-rw-r--r-- | dev-python/pycallgraph/metadata.xml | 7 | ||||
-rw-r--r-- | dev-python/pycallgraph/pycallgraph-1.0.1.ebuild | 69 |
4 files changed, 167 insertions, 0 deletions
diff --git a/dev-python/pycallgraph/Manifest b/dev-python/pycallgraph/Manifest new file mode 100644 index 000000000000..2588b1def347 --- /dev/null +++ b/dev-python/pycallgraph/Manifest @@ -0,0 +1,4 @@ +AUX python3.3-tests.patch 3268 BLAKE2B e6784c758e83ede0edadeae1a14d1e85657db1e715abf1a66562dd54e902cc8d2dd592f52723b6a79f14175d99e79944b41205ac3db6d30d07af42d2e13b3c50 SHA512 274b3af41f80058e1bbacf681b8f2ca7e09069dfb7f0a333cfc7ad417a1a88e738abb0d0ad340ab1b342076b7f331977617dce8b46bcd6e158764ffc09ee6a94 +DIST pycallgraph-1.0.1.tar.gz 458254 BLAKE2B 51cd70d131fc3ab1c702d40c6b411595f26f9547fa2d28dbfc38f4e4b6eb7b56d32c0f2c1c024482376ed4f91299f2a7e3afe099838c045912b18d60580cff8f SHA512 75a20cd8c50f070c961466f89b70384c914129c8ffcbca3ffde8c4729cd5f8a3dc94c4a33d54990e5cb9e502ccd1038c64e878da84cf832065fe4ece74356e2e +EBUILD pycallgraph-1.0.1.ebuild 1822 BLAKE2B 397a4f3fc086e341c5ee8a557a801d821e28728c4194624f6ee6f869e14152fb7dba9559942247635ee0becfa4098cffa97510f683665f9e7d5b5c3f9918c18c SHA512 f061b54300fb2ac8b8204f4d9acd36737efb02a7fba1ff2ceb24c68f881a07ea30d94eb1c2f169193f30000402889a35894ca1f7e1fb79c4eae1b4808bc62355 +MISC metadata.xml 219 BLAKE2B 2f18b5734c8e48a893f628fe312d2c2fa8a43263deb0648d15ffe7d6f0df272ee966fc8a5304d3b085934ee13bc946a0c7476912e23ff2e9fb8258bac7e67557 SHA512 01ebeee6ddaf645337c48e50f68b809e50de83db52ee5d23c1c359d28c1e62b2aaae62a5c72d9b1a675fe2eece6f9195bf276e32e94600000de6375c6a48899a 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..202e1572957c --- /dev/null +++ b/dev-python/pycallgraph/metadata.xml @@ -0,0 +1,7 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <upstream> + <remote-id type="github">gak/pycallgraph</remote-id> + </upstream> +</pkgmetadata> 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 +} |