diff options
author | V3n3RiX <venerix@redcorelinux.org> | 2017-12-03 16:17:22 +0000 |
---|---|---|
committer | V3n3RiX <venerix@redcorelinux.org> | 2017-12-03 16:17:22 +0000 |
commit | 4cd2370bed609c118b6edfde5d3f116e5c35b897 (patch) | |
tree | ec58f2c41f49754e41521d5ebc9dce4597ddd0a5 /dev-python/line_profiler | |
parent | f443475c824b4b5c086e6d040961cb35ad81bc60 (diff) |
gentoo resync : 03.12.2017
Diffstat (limited to 'dev-python/line_profiler')
6 files changed, 5 insertions, 391 deletions
diff --git a/dev-python/line_profiler/Manifest b/dev-python/line_profiler/Manifest index 478cf8f8ea8d..0b1283413240 100644 --- a/dev-python/line_profiler/Manifest +++ b/dev-python/line_profiler/Manifest @@ -1,9 +1,4 @@ -AUX line_profiler-1.0-fix-name-from-copypasta.patch 862 BLAKE2B da7b481a288cd91d473763d67a7c1f9f8a995a97d03e978c256d176830a07da80f183289c15982f9565201abb36b69692a7419da739fd128cdc03eec4c3c2ab5 SHA512 6c36b574d6c031fe9c8d6dd7c59a033c5ec3dca25d675c52cea4d990e6044b5a413a347e2bd220f7912ce06e066c36839cec70af36e5153aad6c086a1d30eae6 -AUX line_profiler-1.0-ipython-5.0-compatibility.patch 11633 BLAKE2B 8a35ab5da202b306e918b68773ea3557f4c89010b11262c95ad21e36334274f2265f687a0e80ce2efd32c62a54603449ddce0b87b98cca1fb93e4c604249de15 SHA512 23019c545e348bc794dbb3c251e2f53c245723814c8439e5f00356494c9260a51fbe41efeebb97448bc206b1e1b0e6d8748318c261a5a6ffaee427fbce22bd8f -DIST line_profiler-1.0.tar.gz 65862 SHA256 a9e0c9ffa814f1215107c86c890afa8e63bec5a37d951f6f9d3668c1df2b1900 SHA512 15dd7ee10951287a5030eaff28e729e82094ec41d8e8dec803d5e44c6b9036ecbf1198365ef43c1fdd28451dec260c6491d118f1762d99fe037bb85eb7908dda WHIRLPOOL 1fd56ea4777a3c569807a124c708018fc77e68521d1f1ecdb13c343ddad3fcd881353cd71a0af36d06a12f1dd17be0f2731040fca5e827a4936298057dabf917 DIST line_profiler-2.0.tar.gz 68478 SHA256 739f8ad0e4bcd0cb82e99afc09e00a0351234f6b3f0b1f7f0090a8a2fbbf8381 SHA512 c0335fc69fb47c150fa5555af4f7fdf4b172ca12ee6512e04ba854c4a81f3e6ee5594e484d11c8ea7e9e8048e3f3b8661db52332d4ac645195a0e050acea4ecb WHIRLPOOL 6f4a3816fb22c86fe1c691a3e949be41da7680055db5c0909dbfb9af4052cfa50640eca43e0e918e903c23c9e6b8858ebff76e4fa21d8648084ade74f45a2915 -EBUILD line_profiler-1.0-r1.ebuild 683 BLAKE2B aeb5208e59249c514f29c738fa0cca5f3956b985db44d181016bd4bc8f4b91bdbdac215a369ec06bb2679e38578069cd767f4e7cdce2283da82988d3688409d4 SHA512 48263a069ecb191cec782f78ab1056094ee79fd951fc4a3a1cad7355f6595f39bf2f89189f953c7855a8d510be0a9c6aad41c1132e646973d643506df7a20f40 -EBUILD line_profiler-1.0.ebuild 568 BLAKE2B 9569dba79d334f72e31dc22438a40ead01a29d9480338835fa8d00c738850bb79f00d8e70aa399b129d9a000fd212d80461289db568f4c48d58a2512cb7fb713 SHA512 226f5ffc8cd8e12208d3e909504bb9cce15e9f809aaa927cefb7e16bb7ecb63d3c6318cf2ac342b1b84c6a1b5d90e842dbcc39a7acc6a02c5ea5f723ecbe8ebf -EBUILD line_profiler-2.0.ebuild 626 BLAKE2B 0df12b44ba418979d9842ffb11aee14afd861ac3202166aa06b16ca14d3245ab1461f58680de57e71a23d5782a30f653b695b02d0c84be1c57214968820aff37 SHA512 8e93760d55b381eec44ed1f9a2f48850380fc5ca7553def3daca7df9b61d30bde61ce77e64f26029cb42b09ef4ec9e3795b7bd7a3d59682b0bd48f6336561426 +EBUILD line_profiler-2.0.ebuild 674 BLAKE2B f3223c39f2d1c22b71adff9073156b59301bd96a34f9826707344a7a6e012ed07616642808061bf8cc7b85054041268b5ae69eb8adb77de0c413b702f027ed88 SHA512 cba4c9e90871b52c89c5654dde6cdfe9a24910d9613938f69af54101afd48eff7059c34a36a47be367a97c6a4f46aab6a5d3693633b931b31ddae06d42387a60 EBUILD line_profiler-9999.ebuild 582 BLAKE2B 5faee1ec552d26cb8f329f63785bf09239766282ea120fa4e73b51aeb24ab9bc7c4770fd74fbb34306448f2f41a1db491ffdbf5ecb716bcdda3fc1b9b3719683 SHA512 4f50a2bf39ceb6d132c74705358d396ed5ff341fd8cda88f29c8cd5427a32e65c37c5c358ea620c3ca8fa85fa52c974bfd711df465c51f1bb778a196ae923662 MISC metadata.xml 810 BLAKE2B c33c34783a48453f89533d8b65966034b7a88e99ac45d1cd6e2bfc9732f6181dde1661fdfae9fa913440aa6e1ec168a4386b9f7d7c5a127ba6cf33cf3fdf4a35 SHA512 6369d88b7412ba45e4d38bce909c198dc35db0e163e751f35b17b38739283fbb5b6d7da23e5cf147c4fcc08ebde39c394a8cef1e32d02de273fed1ad55552cea diff --git a/dev-python/line_profiler/files/line_profiler-1.0-fix-name-from-copypasta.patch b/dev-python/line_profiler/files/line_profiler-1.0-fix-name-from-copypasta.patch deleted file mode 100644 index e51a24f86171..000000000000 --- a/dev-python/line_profiler/files/line_profiler-1.0-fix-name-from-copypasta.patch +++ /dev/null @@ -1,25 +0,0 @@ -From 717df8c2088087ea4bce870400a2c99b36b0e53d Mon Sep 17 00:00:00 2001 -From: Robert Kern <rkern@enthought.com> -Date: Mon, 21 Dec 2015 19:25:51 +0000 -Subject: [PATCH] BUG: fix name from copypasta. - -Fixes #43 - -Thanks, @anntzer! ---- - line_profiler.py | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/line_profiler.py b/line_profiler.py -index 4480c7b..aac01c8 100755 ---- a/line_profiler.py -+++ b/line_profiler.py -@@ -303,7 +303,7 @@ def magic_lprun(self, parameter_s=''): - mod = __import__(modname, fromlist=['']) - profile.add_module(mod) - except Exception as e: -- raise UsageError('Could not find module %r.\n%s: %s' % (name, -+ raise UsageError('Could not find module %r.\n%s: %s' % (modname, - e.__class__.__name__, e)) - - # Add the profiler to the builtins for @profile. diff --git a/dev-python/line_profiler/files/line_profiler-1.0-ipython-5.0-compatibility.patch b/dev-python/line_profiler/files/line_profiler-1.0-ipython-5.0-compatibility.patch deleted file mode 100644 index 04caa8c6987c..000000000000 --- a/dev-python/line_profiler/files/line_profiler-1.0-ipython-5.0-compatibility.patch +++ /dev/null @@ -1,299 +0,0 @@ -https://github.com/rkern/line_profiler/pull/65 - -From 677a43104dd537b515c06eaeffa77f8dcfa5a76e Mon Sep 17 00:00:00 2001 -From: Brett Olsen <brett.olsen@invitae.com> -Date: Tue, 12 Jul 2016 10:18:28 -0700 -Subject: [PATCH 1] Update for compatibility with IPython 5.0 - -Also tested with IPython 4.1.1. Replaces the depreciated ip.define_magic() method with ip.register_magics() and some modifications to handle the different API required. ---- - line_profiler.py | 245 ++++++++++++++++++++++++++++--------------------------- - 1 file changed, 125 insertions(+), 120 deletions(-) - -diff --git a/line_profiler.py b/line_profiler.py -index aac01c8..7645997 100755 ---- a/line_profiler.py -+++ b/line_profiler.py -@@ -17,6 +17,8 @@ - import os - import sys - -+from IPython.core.magic import (Magics, magics_class, line_magic) -+ - from _line_profiler import LineProfiler as CLineProfiler - - # Python 2/3 compatibility utils -@@ -226,150 +228,153 @@ def show_text(stats, unit, stream=None, stripzeros=False): - for (fn, lineno, name), timings in sorted(stats.items()): - show_func(fn, lineno, name, stats[fn, lineno, name], unit, stream=stream, stripzeros=stripzeros) - --# A %lprun magic for IPython. --def magic_lprun(self, parameter_s=''): -- """ Execute a statement under the line-by-line profiler from the -- line_profiler module. -+@magics_class -+class LineProfilerMagics(Magics): - -- Usage: -- %lprun -f func1 -f func2 <statement> -+ @line_magic -+ def lprun(self, parameter_s=''): -+ """ Execute a statement under the line-by-line profiler from the -+ line_profiler module. - -- The given statement (which doesn't require quote marks) is run via the -- LineProfiler. Profiling is enabled for the functions specified by the -f -- options. The statistics will be shown side-by-side with the code through the -- pager once the statement has completed. -+ Usage: -+ %lprun -f func1 -f func2 <statement> - -- Options: -+ The given statement (which doesn't require quote marks) is run via the -+ LineProfiler. Profiling is enabled for the functions specified by the -f -+ options. The statistics will be shown side-by-side with the code through the -+ pager once the statement has completed. - -- -f <function>: LineProfiler only profiles functions and methods it is told -- to profile. This option tells the profiler about these functions. Multiple -- -f options may be used. The argument may be any expression that gives -- a Python function or method object. However, one must be careful to avoid -- spaces that may confuse the option parser. Additionally, functions defined -- in the interpreter at the In[] prompt or via %run currently cannot be -- displayed. Write these functions out to a separate file and import them. -+ Options: - -- -m <module>: Get all the functions/methods in a module -+ -f <function>: LineProfiler only profiles functions and methods it is told -+ to profile. This option tells the profiler about these functions. Multiple -+ -f options may be used. The argument may be any expression that gives -+ a Python function or method object. However, one must be careful to avoid -+ spaces that may confuse the option parser. Additionally, functions defined -+ in the interpreter at the In[] prompt or via %run currently cannot be -+ displayed. Write these functions out to a separate file and import them. - -- One or more -f or -m options are required to get any useful results. -+ -m <module>: Get all the functions/methods in a module - -- -D <filename>: dump the raw statistics out to a pickle file on disk. The -- usual extension for this is ".lprof". These statistics may be viewed later -- by running line_profiler.py as a script. -+ One or more -f or -m options are required to get any useful results. - -- -T <filename>: dump the text-formatted statistics with the code side-by-side -- out to a text file. -+ -D <filename>: dump the raw statistics out to a pickle file on disk. The -+ usual extension for this is ".lprof". These statistics may be viewed later -+ by running line_profiler.py as a script. - -- -r: return the LineProfiler object after it has completed profiling. -+ -T <filename>: dump the text-formatted statistics with the code side-by-side -+ out to a text file. - -- -s: strip out all entries from the print-out that have zeros. -- """ -- # Local imports to avoid hard dependency. -- from distutils.version import LooseVersion -- import IPython -- ipython_version = LooseVersion(IPython.__version__) -- if ipython_version < '0.11': -- from IPython.genutils import page -- from IPython.ipstruct import Struct -- from IPython.ipapi import UsageError -- else: -- from IPython.core.page import page -- from IPython.utils.ipstruct import Struct -- from IPython.core.error import UsageError -- -- # Escape quote markers. -- opts_def = Struct(D=[''], T=[''], f=[], m=[]) -- parameter_s = parameter_s.replace('"', r'\"').replace("'", r"\'") -- opts, arg_str = self.parse_options(parameter_s, 'rsf:m:D:T:', list_all=True) -- opts.merge(opts_def) -- -- global_ns = self.shell.user_global_ns -- local_ns = self.shell.user_ns -- -- # Get the requested functions. -- funcs = [] -- for name in opts.f: -- try: -- funcs.append(eval(name, global_ns, local_ns)) -- except Exception as e: -- raise UsageError('Could not find function %r.\n%s: %s' % (name, -- e.__class__.__name__, e)) -+ -r: return the LineProfiler object after it has completed profiling. - -- profile = LineProfiler(*funcs) -+ -s: strip out all entries from the print-out that have zeros. -+ """ -+ # Local imports to avoid hard dependency. -+ from distutils.version import LooseVersion -+ import IPython -+ ipython_version = LooseVersion(IPython.__version__) -+ if ipython_version < '0.11': -+ from IPython.genutils import page -+ from IPython.ipstruct import Struct -+ from IPython.ipapi import UsageError -+ else: -+ from IPython.core.page import page -+ from IPython.utils.ipstruct import Struct -+ from IPython.core.error import UsageError -+ -+ # Escape quote markers. -+ opts_def = Struct(D=[''], T=[''], f=[], m=[]) -+ parameter_s = parameter_s.replace('"', r'\"').replace("'", r"\'") -+ opts, arg_str = self.parse_options(parameter_s, 'rsf:m:D:T:', list_all=True) -+ opts.merge(opts_def) -+ -+ global_ns = self.shell.user_global_ns -+ local_ns = self.shell.user_ns -+ -+ # Get the requested functions. -+ funcs = [] -+ for name in opts.f: -+ try: -+ funcs.append(eval(name, global_ns, local_ns)) -+ except Exception as e: -+ raise UsageError('Could not find function %r.\n%s: %s' % (name, -+ e.__class__.__name__, e)) - -- # Get the modules, too -- for modname in opts.m: -- try: -- mod = __import__(modname, fromlist=['']) -- profile.add_module(mod) -- except Exception as e: -- raise UsageError('Could not find module %r.\n%s: %s' % (modname, -- e.__class__.__name__, e)) -- -- # Add the profiler to the builtins for @profile. -- if PY3: -- import builtins -- else: -- import __builtin__ as builtins -+ profile = LineProfiler(*funcs) - -- if 'profile' in builtins.__dict__: -- had_profile = True -- old_profile = builtins.__dict__['profile'] -- else: -- had_profile = False -- old_profile = None -- builtins.__dict__['profile'] = profile -+ # Get the modules, too -+ for modname in opts.m: -+ try: -+ mod = __import__(modname, fromlist=['']) -+ profile.add_module(mod) -+ except Exception as e: -+ raise UsageError('Could not find module %r.\n%s: %s' % (modname, -+ e.__class__.__name__, e)) -+ -+ # Add the profiler to the builtins for @profile. -+ if PY3: -+ import builtins -+ else: -+ import __builtin__ as builtins -+ -+ if 'profile' in builtins.__dict__: -+ had_profile = True -+ old_profile = builtins.__dict__['profile'] -+ else: -+ had_profile = False -+ old_profile = None -+ builtins.__dict__['profile'] = profile - -- try: - try: -- profile.runctx(arg_str, global_ns, local_ns) -- message = '' -- except SystemExit: -- message = """*** SystemExit exception caught in code being profiled.""" -- except KeyboardInterrupt: -- message = ("*** KeyboardInterrupt exception caught in code being " -- "profiled.") -- finally: -- if had_profile: -- builtins.__dict__['profile'] = old_profile -- -- # Trap text output. -- stdout_trap = StringIO() -- profile.print_stats(stdout_trap, stripzeros='s' in opts) -- output = stdout_trap.getvalue() -- output = output.rstrip() -- -- if ipython_version < '0.11': -- page(output, screen_lines=self.shell.rc.screen_length) -- else: -- page(output) -- print(message, end="") -+ try: -+ profile.runctx(arg_str, global_ns, local_ns) -+ message = '' -+ except SystemExit: -+ message = """*** SystemExit exception caught in code being profiled.""" -+ except KeyboardInterrupt: -+ message = ("*** KeyboardInterrupt exception caught in code being " -+ "profiled.") -+ finally: -+ if had_profile: -+ builtins.__dict__['profile'] = old_profile -+ -+ # Trap text output. -+ stdout_trap = StringIO() -+ profile.print_stats(stdout_trap, stripzeros='s' in opts) -+ output = stdout_trap.getvalue() -+ output = output.rstrip() -+ -+ if ipython_version < '0.11': -+ page(output, screen_lines=self.shell.rc.screen_length) -+ else: -+ page(output) -+ print(message, end="") - -- dump_file = opts.D[0] -- if dump_file: -- profile.dump_stats(dump_file) -- print('\n*** Profile stats pickled to file %r. %s' % ( -- dump_file, message)) -+ dump_file = opts.D[0] -+ if dump_file: -+ profile.dump_stats(dump_file) -+ print('\n*** Profile stats pickled to file %r. %s' % ( -+ dump_file, message)) - -- text_file = opts.T[0] -- if text_file: -- pfile = open(text_file, 'w') -- pfile.write(output) -- pfile.close() -- print('\n*** Profile printout saved to text file %r. %s' % ( -- text_file, message)) -+ text_file = opts.T[0] -+ if text_file: -+ pfile = open(text_file, 'w') -+ pfile.write(output) -+ pfile.close() -+ print('\n*** Profile printout saved to text file %r. %s' % ( -+ text_file, message)) - -- return_value = None -- if 'r' in opts: -- return_value = profile -+ return_value = None -+ if 'r' in opts: -+ return_value = profile - -- return return_value -+ return return_value - - - def load_ipython_extension(ip): - """ API for IPython to recognize this module as an IPython extension. - """ -- ip.define_magic('lprun', magic_lprun) -+ ip.register_magics(LineProfilerMagics) - - - def load_stats(filename): diff --git a/dev-python/line_profiler/line_profiler-1.0-r1.ebuild b/dev-python/line_profiler/line_profiler-1.0-r1.ebuild deleted file mode 100644 index 6dbe4b315ca2..000000000000 --- a/dev-python/line_profiler/line_profiler-1.0-r1.ebuild +++ /dev/null @@ -1,32 +0,0 @@ -# Copyright 1999-2016 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 - -EAPI=6 - -PYTHON_COMPAT=( python2_7 python3_{4,5} ) - -inherit distutils-r1 - -DESCRIPTION="Line-by-line profiler" -HOMEPAGE="https://github.com/rkern/line_profiler" -SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz" -KEYWORDS="~amd64" - -SLOT="0" -LICENSE="BSD" -KEYWORDS="~amd64 ~x86" -IUSE="test" - -DEPEND=" - test? ( dev-python/pytest[${PYTHON_USEDEP}] ) - " - -PATCHES=( - "${FILESDIR}/${P}-fix-name-from-copypasta.patch" - "${FILESDIR}/${P}-ipython-5.0-compatibility.patch" -) - -python_test() { - "${PYTHON}" -m unittest discover -v "${S}"/tests/ \ - || die "Tests failed with ${EPYTHON}" -} diff --git a/dev-python/line_profiler/line_profiler-1.0.ebuild b/dev-python/line_profiler/line_profiler-1.0.ebuild deleted file mode 100644 index 802d85e74204..000000000000 --- a/dev-python/line_profiler/line_profiler-1.0.ebuild +++ /dev/null @@ -1,27 +0,0 @@ -# Copyright 1999-2015 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 - -EAPI=5 - -PYTHON_COMPAT=( python2_7 python3_{4,5} ) - -inherit distutils-r1 - -DESCRIPTION="Line-by-line profiler" -HOMEPAGE="https://github.com/rkern/line_profiler" -SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz" -KEYWORDS="~amd64" - -SLOT="0" -LICENSE="BSD" -KEYWORDS="~amd64 ~x86" -IUSE="test" - -DEPEND=" - test? ( dev-python/pytest[${PYTHON_USEDEP}] ) - " - -python_test() { - "${PYTHON}" -m unittest discover -v "${S}"/tests/ \ - || die "Tests failed with ${EPYTHON}" -} diff --git a/dev-python/line_profiler/line_profiler-2.0.ebuild b/dev-python/line_profiler/line_profiler-2.0.ebuild index 81d586184a05..48e524a993c3 100644 --- a/dev-python/line_profiler/line_profiler-2.0.ebuild +++ b/dev-python/line_profiler/line_profiler-2.0.ebuild @@ -3,12 +3,14 @@ EAPI=6 -PYTHON_COMPAT=( python2_7 python3_{4,5} ) +PYTHON_COMPAT=( python2_7 python3_{4,5,6} ) inherit distutils-r1 DESCRIPTION="Line-by-line profiler" -HOMEPAGE="https://github.com/rkern/line_profiler" +HOMEPAGE=" + https://github.com/rkern/line_profiler + https://pypi.python.org/pypi/line_profiler" SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz" KEYWORDS="~amd64" |