From nobody Mon Mar 07 18:27:15 2022 X-Original-To: dev-commits-ports-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 79CA61A06F88; Mon, 7 Mar 2022 18:27:18 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4KC6Pd5Grsz3RKn; Mon, 7 Mar 2022 18:27:17 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1646677638; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=LgC6pnkzZmcNMuMhhmxAbWjna9RHEivJ67a0vu8LsAA=; b=gk7QUkrXZHoGvfyQ3opGORdykEyClKumt9VDtRshiKrP0u7FN7eUWFmRBp6yM5S1whndl7 ywTSoNn1o86+MtIauErDwsFoNgqB6np4ZoozjTDqFA7g3QZ0czxmt2QSy9YUxBDqkYThfL HxYApLSl1VaxAiXwDESY0GQKknDFXNP3o+tg8j9p9kXX93twZYqup9O8IEZ6BCsUW7H5pq i4oUCQyr5pT6uPUIROSZIAtQsxhQxf2iqV/JInXdKuxBaEN+NejpKPcqAJi6U/IeyhwuB0 g0+Yv1OpJTCvKDQGo8MvfulMqBR4IC1xJ65QELz4f2gJfq1JmPDkCl+vakStrQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 11ED357E2; Mon, 7 Mar 2022 18:27:16 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 227IRF5Q085764; Mon, 7 Mar 2022 18:27:15 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 227IRFiZ085763; Mon, 7 Mar 2022 18:27:15 GMT (envelope-from git) Date: Mon, 7 Mar 2022 18:27:15 GMT Message-Id: <202203071827.227IRFiZ085763@gitrepo.freebsd.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org From: Po-Chuan Hsieh Subject: git: 7980753b1f1b - main - devel/py-pycallgraph: Fix build with setuptools 58.0.0+ List-Id: Commits to the main branch of the FreeBSD ports repository List-Archive: https://lists.freebsd.org/archives/dev-commits-ports-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-ports-main@freebsd.org X-BeenThere: dev-commits-ports-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: sunpoet X-Git-Repository: ports X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 7980753b1f1bfb62a7b9fd696f52822f2e1bb945 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1646677638; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=LgC6pnkzZmcNMuMhhmxAbWjna9RHEivJ67a0vu8LsAA=; b=LZfCy0ujLgepkFiwBqfSk6wPZeLhfoHZPO31qO3ajjfjcalYY8BKb6qiwt0ET4ENESQamM SDdm8rRGhpm6in+QNiMAr2ksWFV2enuJ2NjwmPKvmgxMev7o3kGhj4cla2NUnn1Jo66UlP fneagefeB0BH+5EDMHwmZdVpVaeg1Ja+iPPJFgRd2DSwETHdfKt+OJj4BOAdj3V4lw7FDy X465dT5BZsU+rUqz+qvek2lp3JHwVMu3pRINNUN9Mc6HFMdLQwml6e96ZMzZwskKtFYNu5 G652IX0xHAVnsMmJeEy/C7AuhpzIE6bf/pnXFs+VZc252ZmKsah9n0Ric+U9jQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1646677638; a=rsa-sha256; cv=none; b=UF6LpqioWcA7ltc7mKz9WmFR0sbUe80C7Ij83hPVq4P5lPnUJy8WieMzjDn82iDWTHXx/A LwiHcM3oQbIRB+6lbQbq87Lf9CpVpenJQ+CiqpNFkh8Oi+ycYejosvKGze3Zgy5ighXTAJ avrV9ZBZdrljVHg/X+ANPjJzQRoGcYdge56qK6fEn1CDvnl47S335pBgiNB6SqTG4aUxG9 9TfCrinj4qdRSwFQZ8dDjVmogRLfdqAVxHUL3dS/FsHYZFjdvNygLnhOlcmV9arebqhBln T3NlMtvCy+ey+MRPJAUFJ6nHaoqv1riUe/9Ywoq8oSifQNKZUjv8ZOJ+xkB4Pw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by sunpoet: URL: https://cgit.FreeBSD.org/ports/commit/?id=7980753b1f1bfb62a7b9fd696f52822f2e1bb945 commit 7980753b1f1bfb62a7b9fd696f52822f2e1bb945 Author: Po-Chuan Hsieh AuthorDate: 2022-03-07 18:07:26 +0000 Commit: Po-Chuan Hsieh CommitDate: 2022-03-07 18:13:19 +0000 devel/py-pycallgraph: Fix build with setuptools 58.0.0+ With hat: python --- devel/py-pycallgraph/files/patch-2to3 | 306 ++++++++++++++++++++++++++++++++++ 1 file changed, 306 insertions(+) diff --git a/devel/py-pycallgraph/files/patch-2to3 b/devel/py-pycallgraph/files/patch-2to3 new file mode 100644 index 000000000000..05492254ede1 --- /dev/null +++ b/devel/py-pycallgraph/files/patch-2to3 @@ -0,0 +1,306 @@ +--- pycallgraph/config.py.orig 2013-09-17 08:41:50 UTC ++++ 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() + +@@ -51,7 +51,7 @@ class Config(object): + help='OUTPUT_TYPE', dest='output') + parent_parser = self.create_parent_parser() + +- for name, cls in outputters.items(): ++ for name, cls in list(outputters.items()): + cls.add_arguments(subparsers, parent_parser, usage) + + def get_output(self): +--- pycallgraph/memory_profiler.py.orig 2013-09-17 08:41:50 UTC ++++ pycallgraph/memory_profiler.py +@@ -345,8 +345,8 @@ def show_results(prof, stream=None, precision=3): + continue + all_lines = linecache.getlines(filename) + sub_lines = inspect.getblock(all_lines[code.co_firstlineno - 1:]) +- linenos = range(code.co_firstlineno, code.co_firstlineno + +- len(sub_lines)) ++ linenos = list(range(code.co_firstlineno, code.co_firstlineno + ++ len(sub_lines))) + lines_normalized = {} + + header = template.format('Line #', 'Mem usage', 'Increment', +@@ -417,7 +417,7 @@ def magic_mprun(self, parameter_s=''): + -r: return the LineProfiler object after it has completed profiling. + """ + try: +- from StringIO import StringIO ++ from io import StringIO + except ImportError: # Python 3.x + from io import StringIO + +@@ -459,7 +459,7 @@ def magic_mprun(self, parameter_s=''): + try: + import builtins + except ImportError: # Python 3x +- import __builtin__ as builtins ++ import builtins as builtins + + if 'profile' in builtins.__dict__: + had_profile = True +@@ -492,14 +492,14 @@ def magic_mprun(self, parameter_s=''): + page(output, screen_lines=self.shell.rc.screen_length) + else: + page(output) +- print(message,) ++ print((message,)) + + text_file = opts.T[0] + if text_file: + with open(text_file, 'w') as pfile: + pfile.write(output) +- print('\n*** Profile printout saved to text file %s. %s' % (text_file, +- message)) ++ print(('\n*** Profile printout saved to text file %s. %s' % (text_file, ++ message))) + + return_value = None + if 'r' in opts: +@@ -564,7 +564,7 @@ def magic_memit(self, line=''): + mem_usage.extend(tmp) + + if mem_usage: +- print('maximum of %d: %f MB per loop' % (repeat, max(mem_usage))) ++ print(('maximum of %d: %f MB per loop' % (repeat, max(mem_usage)))) + else: + print('ERROR: could not read memory usage, try with a lower interval or more iterations') + +@@ -608,11 +608,11 @@ if __name__ == '__main__': + __file__ = _find_script(args[0]) + try: + if sys.version_info[0] < 3: +- import __builtin__ +- __builtin__.__dict__['profile'] = prof ++ import builtins ++ builtins.__dict__['profile'] = prof + ns = locals() + ns['profile'] = prof # shadow the profile decorator defined above +- execfile(__file__, ns, ns) ++ exec(compile(open(__file__, "rb").read(), __file__, 'exec'), ns, ns) + else: + import builtins + builtins.__dict__['profile'] = prof +--- pycallgraph/output/gephi.py.orig 2013-09-17 08:41:50 UTC ++++ pycallgraph/output/gephi.py +@@ -25,7 +25,7 @@ class GephiOutput(Output): + def generate(self): + '''Returns a string with the contents of a GDF file.''' + +- return u'\n'.join([ ++ return '\n'.join([ + self.generate_nodes(), + self.generate_edges(), + ]) + '\n' +@@ -33,21 +33,21 @@ class GephiOutput(Output): + def generate_nodes(self): + output = [] + +- fields = u', '.join([ +- u'name VARCHAR', +- u'label VARCHAR', +- u'group VARCHAR', +- u'calls INTEGER', +- u'time DOUBLE', +- u'memory_in INTEGER', +- u'memory_out INTEGER', +- u'color VARCHAR', +- u'width DOUBLE', ++ fields = ', '.join([ ++ 'name VARCHAR', ++ 'label VARCHAR', ++ 'group VARCHAR', ++ 'calls INTEGER', ++ 'time DOUBLE', ++ 'memory_in INTEGER', ++ 'memory_out INTEGER', ++ 'color VARCHAR', ++ 'width DOUBLE', + ]) +- output.append(u'nodedef> {}'.format(fields)) ++ output.append('nodedef> {}'.format(fields)) + + for node in self.processor.nodes(): +- fields = u','.join([str(a) for a in [ ++ fields = ','.join([str(a) for a in [ + node.name, + node.name, + node.group, +@@ -55,7 +55,7 @@ class GephiOutput(Output): + node.time.value, + node.memory_in.value, + node.memory_out.value, +- u"'{}'".format(self.node_color_func(node).rgb_csv()), ++ "'{}'".format(self.node_color_func(node).rgb_csv()), + self.node_size(node), + ]]) + output.append(fields) +@@ -68,25 +68,25 @@ class GephiOutput(Output): + def generate_edges(self): + output = [] + +- fields = u', '.join([ +- u'node1 VARCHAR', +- u'node2 VARCHAR', +- u'label VARCHAR', +- u'labelvisible VARCHAR', +- u'directed BOOLEAN', +- u'color VARCHAR', +- u'width DOUBLE', ++ fields = ', '.join([ ++ 'node1 VARCHAR', ++ 'node2 VARCHAR', ++ 'label VARCHAR', ++ 'labelvisible VARCHAR', ++ 'directed BOOLEAN', ++ 'color VARCHAR', ++ 'width DOUBLE', + ]) +- output.append(u'edgedef> {}'.format(fields)) ++ output.append('edgedef> {}'.format(fields)) + + for edge in self.processor.edges(): +- fields = u','.join([str(a) for a in [ ++ fields = ','.join([str(a) for a in [ + edge.src_func, + edge.dst_func, + self.edge_label(edge), + 'true', + 'true', +- u"'{}'".format(self.edge_color_func(edge).rgb_csv()), ++ "'{}'".format(self.edge_color_func(edge).rgb_csv()), + edge.calls.fraction * 2, + ]]) + output.append(fields) +--- pycallgraph/output/graphviz.py.orig 2013-09-17 08:41:50 UTC ++++ pycallgraph/output/graphviz.py +@@ -1,5 +1,5 @@ +-from __future__ import division + ++ + import tempfile + import os + import textwrap +@@ -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), + )) +--- pycallgraph/output/output.py.orig 2013-09-17 10:23:04 UTC ++++ 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) +--- pycallgraph/output/pickle.py.orig 2013-09-17 08:41:50 UTC ++++ pycallgraph/output/pickle.py +@@ -1,7 +1,7 @@ + try: +- import cPickle as pickle ++ import pickle as pickle + except ImportError: +- import pickle ++ from . import pickle + + from .output import Output + +--- pycallgraph/output/ubigraph.py.orig 2013-09-17 08:41:50 UTC ++++ pycallgraph/output/ubigraph.py +@@ -1,5 +1,5 @@ + try: +- from xmlrpclib import Server ++ from xmlrpc.client import Server + except ImportError: + from xmlrpc.client import Server + +--- pycallgraph/tracer.py.orig 2013-09-17 08:41:50 UTC ++++ pycallgraph/tracer.py +@@ -1,5 +1,5 @@ +-from __future__ import division + ++ + import inspect + import sys + import os +@@ -8,7 +8,7 @@ from distutils import sysconfig + from collections import defaultdict + from threading import Thread + try: +- from Queue import Queue, Empty ++ from queue import Queue, Empty + except ImportError: + from queue import Queue, Empty + +@@ -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 +--- setup.py.orig 2013-09-17 08:41:50 UTC ++++ setup.py +@@ -42,7 +42,6 @@ setup( + packages=['pycallgraph', 'pycallgraph.output'], + scripts=['scripts/pycallgraph'], + data_files=data_files, +- use_2to3=True, + + # TODO: Update download_url + download_url =