From nobody Mon Mar 7 18:27:13 2022 X-Original-To: dev-commits-ports-all@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 3002D1A06DB5; Mon, 7 Mar 2022 18:27:15 +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 4KC6PZ4xSrz3h8y; Mon, 7 Mar 2022 18:27:14 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1646677635; 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=vuA4onCglC4YNAVaElANSe9N5WcQ+IQdv4UlPY3z6mc=; b=X6kBD647HG/+84mVIyfIvo1+BW/Maq1IvS6ZhpEhQaH13Cbnzmx9Ky0+lokxLWVmgRB7My mL8kyW6sD6FpCb+zedymzCpymmxxQzdsqFi3/Z7WeZHNVYMdUhgyAX9zDXqwmBVuO1lbkQ hDQPYvTH3FPsO5RL3aIl3MMHLPYmVL6yISHb/YrUSwRYSse04Y9rRY0p1f4iPNXW3qJQ+l lkGF3AHob/mmwcdcglINa8JPS2Ru9GWpxD3YT9cmr810v+5qU9IoIyTI5nC6eqd1rK9G8n S/usTPhqS5eMPOM96wqljwGc5Kxs2CQtNDtYfPzNR4IbdPYqzO5PuCF32osRaA== 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 BD071598D; Mon, 7 Mar 2022 18:27:13 +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 227IRDu5085712; Mon, 7 Mar 2022 18:27:13 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 227IRD8S085711; Mon, 7 Mar 2022 18:27:13 GMT (envelope-from git) Date: Mon, 7 Mar 2022 18:27:13 GMT Message-Id: <202203071827.227IRD8S085711@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: 3147872f1210 - main - devel/py-opster: Fix build with setuptools 58.0.0+ List-Id: Commit messages for all branches of the ports repository List-Archive: https://lists.freebsd.org/archives/dev-commits-ports-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-ports-all@freebsd.org X-BeenThere: dev-commits-ports-all@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: 3147872f1210ca89e59206a9f794527b407d9fa1 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1646677635; 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=vuA4onCglC4YNAVaElANSe9N5WcQ+IQdv4UlPY3z6mc=; b=BMQkMKalwJ9MWRVuNK/Yz/OrwlIrImZktV830r3iUtaT4BcE3f6cm7u/AQR0K+F5BYA0ND r2YKV9A5G7qCD9VJsZeg9V5GMfWiqP5vIkfGBSTQEp9wRPVU33WuYbVg0xvfupyPZxM5K3 Xf7EQnrvrpL40E3JTtzoT18eqrJZogi+qBMVkU/LOdyE/H4wabZFIhw0zMv20vjz2CqdnS O8zl8qfOl3jRmC8frfVVfDRhFl8XYVKLqMRXluwh5q4mfHdl0wtzW39FpLICnqEymeLBFU XXG6E4fuwLpvEZEQ3TwksHSNOuMwmzDTRsJZUvjwkluCkNBCz1kqYnU3NpDOrw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1646677635; a=rsa-sha256; cv=none; b=Ys1VsUC4Q7mYLmcB+3PRC+Z4ck8DoJOlNvVytCm1Z4/MfVMR50IUXrGWW/ARM0k1nKHbeE c1rR42/9ISY1I3fyimwI7wcBZp9CtogUtoSPXGeCf0wPxCcQZmHB+dgk0rTCP4bUeRksvD zKD++wcUid7OpKU2EKwFmgqwWZ0OpWjIz0NcDQf3cyE0YXriPg/CGn311sIcelbkuS+3nz khbTwywAoaPO9HbZJoJVA/Vcys4M5McCfyPEdI0mQtkBXR6cPFVJiV+81mrrBpE6Tw5AIf adU/gI4R6qRKdh3mLl5G4nGOHZm7eHekZ9MtGBW3SJCGVKsUeenwvNNRFere+g== 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=3147872f1210ca89e59206a9f794527b407d9fa1 commit 3147872f1210ca89e59206a9f794527b407d9fa1 Author: Po-Chuan Hsieh AuthorDate: 2022-03-07 18:07:24 +0000 Commit: Po-Chuan Hsieh CommitDate: 2022-03-07 18:13:18 +0000 devel/py-opster: Fix build with setuptools 58.0.0+ With hat: python --- devel/py-opster/files/patch-2to3 | 162 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 162 insertions(+) diff --git a/devel/py-opster/files/patch-2to3 b/devel/py-opster/files/patch-2to3 new file mode 100644 index 000000000000..28d5586f314e --- /dev/null +++ b/devel/py-opster/files/patch-2to3 @@ -0,0 +1,162 @@ +--- opster.py.orig 2018-10-21 19:05:05 UTC ++++ opster.py +@@ -3,7 +3,7 @@ + ''' + + import sys, traceback, getopt, types, textwrap, inspect, os, re, keyword, codecs +-from itertools import imap ++ + from functools import wraps + from collections import namedtuple, Callable + from contextlib import contextmanager +@@ -19,12 +19,12 @@ def write(text, out=None): + '''Write output to a given stream (stdout by default).''' + out = out or sys.stdout + try: +- print >> out, text ++ print(text, file=out) + # Needed on Python 2.x if text is str/bytes containing non-ascii + # characters and sys.stdout is replaced by a writer from the codecs + # module. text will be decoded as ascii giving the decode error. + except UnicodeDecodeError: +- print >> out, text.decode('utf-8') ++ print(text.decode('utf-8'), file=out) + # Get the order of stdout/stderr correct on Windows. AFAICT this is only + # needed for the test environment but it's harmless otherwise. + out.flush() +@@ -294,9 +294,9 @@ def help_(cmdtable, globalopts, scriptname): + hlp = {} + # determine if any command is marked for shortlist + shortlist = (name == 'shortlist' and +- any(imap(lambda x: x.startswith('^'), cmdtable))) ++ any(map(lambda x: x.startswith('^'), cmdtable))) + +- for cmd, info in cmdtable.items(): ++ for cmd, info in list(cmdtable.items()): + if cmd.startswith('~'): + continue # do not display hidden commands + if shortlist and not cmd.startswith('^'): +@@ -306,7 +306,7 @@ def help_(cmdtable, globalopts, scriptname): + hlp[cmd] = doc.strip().splitlines()[0].rstrip() + + hlplist = sorted(hlp) +- maxlen = max(map(len, hlplist)) ++ maxlen = max(list(map(len, hlplist))) + + write('usage: %s [options]' % scriptname) + write('\ncommands:\n') +@@ -449,7 +449,7 @@ def Option(opt): + def CmdTable(cmdtable): + '''Factory to convert option tuples in a cmdtable''' + newtable = {} +- for name, (func, opts, usage) in cmdtable.items(): ++ for name, (func, opts, usage) in list(cmdtable.items()): + newtable[name] = (func, [Option(o) for o in opts], usage) + return newtable + +@@ -499,7 +499,7 @@ class LiteralOption(BaseOption): + + class UnicodeOption(BaseOption): + '''Handle unicode values, decoding input''' +- type = unicode ++ type = str + + def convert(self, final): + return decodearg(final) +@@ -508,7 +508,7 @@ class UnicodeOption(BaseOption): + class BoolOption(BaseOption): + '''Boolean option type.''' + has_parameter = False +- type = (bool, types.NoneType) ++ type = (bool, type(None)) + + def convert(self, final): + return bool(final) +@@ -682,7 +682,7 @@ def findpossible(cmd, table): + ''' + pattern = '.*?'.join(list(cmd)) + choice = {} +- for e in table.keys(): ++ for e in list(table.keys()): + aliases = aliases_(e) + found = None + if cmd in aliases: +@@ -706,12 +706,12 @@ def findcmd(cmd, table): + return choice[cmd] + + if len(choice) > 1: +- clist = choice.keys() ++ clist = list(choice.keys()) + clist.sort() + raise AmbiguousCommand(cmd, clist) + + if choice: +- return choice.values()[0] ++ return list(choice.values())[0] + + raise UnknownCommand(cmd) + +@@ -951,7 +951,7 @@ def pretty_doc_string(item): + if len(lines) <= 1: + return raw_doc + indent = len(lines[1]) - len(lines[1].lstrip()) +- return '\n'.join([lines[0]] + map(lambda l: l[indent:], lines[1:])) ++ return '\n'.join([lines[0]] + [l[indent:] for l in lines[1:]]) + + + def name_from_python(name): +@@ -990,12 +990,12 @@ def autocomplete(cmdtable, args, middleware): + current = '' + + commands = [] +- for k in cmdtable.keys(): ++ for k in list(cmdtable.keys()): + commands += aliases_(k) + + # command + if cword == 1: +- print ' '.join(filter(lambda x: x.startswith(current), commands)) ++ print(' '.join([x for x in commands if x.startswith(current)])) + + # command options + elif cwords[0] in commands: +@@ -1013,9 +1013,9 @@ def autocomplete(cmdtable, args, middleware): + if middleware: + completer = middleware(completer) + args = completer(current) +- print ' '.join(args), ++ print(' '.join(args), end=' ') + +- print ' '.join((o for o in options if o.startswith(current))) ++ print(' '.join((o for o in options if o.startswith(current)))) + + sys.exit(1) + +@@ -1058,7 +1058,7 @@ def completion(type=('t', 'bash', 'Completion type (ba + '''Outputs completion script for bash or zsh.''' + + prog_name = os.path.split(sys.argv[0])[1] +- print COMPLETIONS[type].strip() % prog_name ++ print(COMPLETIONS[type].strip() % prog_name) + + + # -------- +--- setup.py.orig 2018-10-21 19:01:07 UTC ++++ setup.py +@@ -4,10 +4,6 @@ import sys, os, re + + from setuptools import setup + +-if sys.version_info[0] >= 3: +- extra = {'use_2to3': True} +-else: +- extra = {} + + def read(fname): + return open(os.path.join(os.path.dirname(__file__), fname)).read() +@@ -46,4 +42,4 @@ setup( + ], + py_modules=['opster'], + platforms='any', +- **extra) ++ )