From nobody Fri Mar 25 13:43:25 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 9EA181A2A6F6; Fri, 25 Mar 2022 13:43:26 +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 4KQ3Fn5l2Kz3LKN; Fri, 25 Mar 2022 13:43:25 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1648215806; 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=orapm1rH7CmGzODhFvFL+OPXFmuXmnTibrSRF2vZiqE=; b=oVglz2+GhnHfS9YJ1JZEL59EoRaEmfQWK/KekggkAupJZXxarKy4W56Rw6y4Z24db/paK+ V4yeiPrw1Iiq9lAVf7t8mfT4J4VyKv9sP953i8bp1VfhhfdEe6H1ffXh20wZ4AmSXPSXjb Qh89U/kRMtwh3Ap7PxW/gEBOeogSGfZrzJWkWLv9Xd6dVn1hiMrWEOHtJ34jMF2KpqnbIo BuVq67wYRJOBofjD/w3A6CxOuYJ8BhFx6cu1XgkRG480gTrx1UZgGez4VsMiXsDIGESaok 8MP99uHtOvZbvXH8uBPLh+SrzvcwEZoVGJUtAmednh361UKo6Jn5H9UdReZY3A== 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 638A4588A; Fri, 25 Mar 2022 13:43:25 +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 22PDhPYI019364; Fri, 25 Mar 2022 13:43:25 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 22PDhPxJ019363; Fri, 25 Mar 2022 13:43:25 GMT (envelope-from git) Date: Fri, 25 Mar 2022 13:43:25 GMT Message-Id: <202203251343.22PDhPxJ019363@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: c2f0bf17429e - main - astro/py-ro: 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: c2f0bf17429e466652af114974d3a7f915c525f7 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1648215806; 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=orapm1rH7CmGzODhFvFL+OPXFmuXmnTibrSRF2vZiqE=; b=QJcPBmWGXONivxTWLJQXmoMXzpxCrPJj4xiBsql1VAWmfg+RoLg8n3a7KktFbnuSRj/Mch cngr/9jLVlsePT0Osk0kvUN5BDp7VLSeGzRN9AFmnivKB4kL15Oi9eb8NGS54mW2THj+Jh NBaTGARNjS1YPlTl/yuvw2EzO13DbWf7yNNUVVGgXGe/5XNccHc4Kszy9nPUOJ+EQf5Ie0 mFJ79jA3Fqc56ROpp33vyM9gPXUaOjZqF3bCry9Viq9zqJ1JMCHEq3QtdEGvxtftlIWJzW PyIB38w6L0ZxZ3Tegvxp4PsmDx2/I393785rxY8wcJwvVahRskKNYO6/KxEvIQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1648215806; a=rsa-sha256; cv=none; b=QSqVZIH8ILQPNFlMzdpbKb/4/xo790YTeMKuprVYxeYEvWhzl5BJmAriQmCfqx4soYDDLr +vJvwgageIkpOLU/dnLXtYWn01Vpvxrqxm2X08okgxb4RkM5upxCgnl8mgCFvTS+x2i8dB IaZizpauulmV0Pgz/7rmuJykIsr+o7oAlb49zbVxT4RFQXxYQ5k6L3DUTN8DFpbIfdGUwe EwiK9B8tYmFceU6hp+HsT9V3eHTVYlHlqSfV8sXB/1SWE4AnZRgHXh5ktgMJljxjMJJ0Oi yidNAgFlreCcHdXu0PEG7ZkKBXdPxfkGgD1dvE2H4MGL62TaSjGglTvNcei9Ow== 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=c2f0bf17429e466652af114974d3a7f915c525f7 commit c2f0bf17429e466652af114974d3a7f915c525f7 Author: Po-Chuan Hsieh AuthorDate: 2022-03-25 12:47:26 +0000 Commit: Po-Chuan Hsieh CommitDate: 2022-03-25 13:36:49 +0000 astro/py-ro: Fix build with setuptools 58.0.0+ --- astro/py-ro/files/patch-2to3 | 191 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 191 insertions(+) diff --git a/astro/py-ro/files/patch-2to3 b/astro/py-ro/files/patch-2to3 new file mode 100644 index 000000000000..f96bb60b9f4a --- /dev/null +++ b/astro/py-ro/files/patch-2to3 @@ -0,0 +1,191 @@ +--- python/RO/AddCallback.py.orig 2015-11-03 17:58:36 UTC ++++ python/RO/AddCallback.py +@@ -1,4 +1,4 @@ +-from __future__ import absolute_import, division, print_function ++ + """Mixing class(es) for adding callback capabilities. + + History: +@@ -145,7 +145,7 @@ class BaseMixin(object): + return + + if not callable(callFunc): +- raise ValueError, "callFunc %r is not callable" % (callFunc,) ++ raise ValueError("callFunc %r is not callable" % (callFunc,)) + + # add new function + if callFunc not in self._callbacks: +@@ -264,7 +264,7 @@ class TkButtonMixin(BaseMixin): + + if command is not None: + if not callable(command): +- raise ValueError, "command %r is not callable" % (command,) ++ raise ValueError("command %r is not callable" % (command,)) + def doCommand(wdg): + return command() + self.addCallback(doCommand) +--- python/RO/procFiles.py.orig 2015-09-24 22:49:08 UTC ++++ python/RO/procFiles.py +@@ -1,5 +1,5 @@ + #!/usr/bin/env python +-from __future__ import absolute_import, division, print_function ++ + """procFiles calls a user-supplied function "func" to process a set of files one by one. + The processed data is typically concatenated into one output file, but this behavior + is controlled by outPath. +@@ -161,7 +161,7 @@ def procFiles ( + ): + # make sure func is callable + if not callable(func): +- raise RuntimeError, "supplied function is not callable" ++ raise RuntimeError("supplied function is not callable") + + # handle case of inPathList being a single string + inPathList = RO.SeqUtil.asSequence(inPathList) +@@ -212,7 +212,7 @@ def procFiles ( + sys.stdout = file(outPath, 'w') + except ImportError: + # unknown platform; use standard prompt +- outFile = raw_input( ++ outFile = input( + "output file relative to %r [stdout]: " % outDir) + + # generate outPath, and if it's a file, open it and redirect stdout +--- python/RO/Wdg/PythonWdg.py.orig 2015-09-24 22:59:33 UTC ++++ python/RO/Wdg/PythonWdg.py +@@ -1,5 +1,5 @@ + #!/usr/bin/env python +-from __future__ import division, print_function ++ + """An interactive Python session and simple script file editor/runner + that may be used from Tkinter scripts. Before running a script,x=Tk() is replaced with x=Toplevel() and mainloop() is eliminated. Hence some Tk scripts + may be safely run. Presumably there are limitations. I suspect that mucking about +@@ -41,13 +41,13 @@ __all__ = ['PythonWdg'] + + import os + import re +-import Tkinter +-import tkFileDialog ++import tkinter ++import tkinter.filedialog + import RO.CnvUtil + import RO.OS +-import Text ++from . import Text + +-class PythonWdg(Tkinter.Frame): ++class PythonWdg(tkinter.Frame): + """A frame containing text window into which you may enter Python code. + + Inputs: +@@ -60,7 +60,7 @@ class PythonWdg(Tkinter.Frame): + filePath = None, + helpURL = None, + **kargs): +- Tkinter.Frame.__init__(self, master, **kargs) ++ tkinter.Frame.__init__(self, master, **kargs) + + self.master=master + self.filePath = filePath +@@ -71,39 +71,39 @@ class PythonWdg(Tkinter.Frame): + height = 10, + helpURL = helpURL + ) +- self.inputWdg.grid(row=0, column=0, sticky=Tkinter.NSEW) ++ self.inputWdg.grid(row=0, column=0, sticky=tkinter.NSEW) + self.inputWdg.bind("", self.run) + +- self.scroll = Tkinter.Scrollbar(self, command=self.inputWdg.yview) ++ self.scroll = tkinter.Scrollbar(self, command=self.inputWdg.yview) + self.inputWdg.configure(yscrollcommand=self.scroll.set) +- self.scroll.grid(row=0, column=1, sticky=Tkinter.NS) ++ self.scroll.grid(row=0, column=1, sticky=tkinter.NS) + + if self.filePath: + fd = RO.OS.openUniv(self.filePath) + try: +- self.inputWdg.delete(1.0, Tkinter.END) ++ self.inputWdg.delete(1.0, tkinter.END) + for line in fd.readlines(): +- self.inputWdg.insert(Tkinter.END, line) ++ self.inputWdg.insert(tkinter.END, line) + finally: + fd.close() + +- self.cmdbar = Tkinter.Frame(self, borderwidth=2, relief=Tkinter.SUNKEN) +- self.open = Tkinter.Button(self.cmdbar, text='Open...', command=self.open) +- self.open.pack(side=Tkinter.LEFT, expand=0, padx=3, pady=3) +- self.save = Tkinter.Button(self.cmdbar, text='Save...', command=self.save) +- self.save.pack(side=Tkinter.LEFT, expand=0, padx=3, pady=3) +- self.clr = Tkinter.Button(self.cmdbar, text='Clear', command=self.clr) +- self.clr.pack(side=Tkinter.LEFT, expand=0, padx=3, pady=3) +- self.run =Tkinter.Button(self.cmdbar, text='Run', command=self.run) +- self.run.pack(side=Tkinter.RIGHT, expand=0, padx=3, pady=3) +- self.cmdbar.grid(row=1, column=0, columnspan=2, sticky=Tkinter.EW) ++ self.cmdbar = tkinter.Frame(self, borderwidth=2, relief=tkinter.SUNKEN) ++ self.open = tkinter.Button(self.cmdbar, text='Open...', command=self.open) ++ self.open.pack(side=tkinter.LEFT, expand=0, padx=3, pady=3) ++ self.save = tkinter.Button(self.cmdbar, text='Save...', command=self.save) ++ self.save.pack(side=tkinter.LEFT, expand=0, padx=3, pady=3) ++ self.clr = tkinter.Button(self.cmdbar, text='Clear', command=self.clr) ++ self.clr.pack(side=tkinter.LEFT, expand=0, padx=3, pady=3) ++ self.run =tkinter.Button(self.cmdbar, text='Run', command=self.run) ++ self.run.pack(side=tkinter.RIGHT, expand=0, padx=3, pady=3) ++ self.cmdbar.grid(row=1, column=0, columnspan=2, sticky=tkinter.EW) + + self.grid_rowconfigure(0, weight=1) + self.grid_columnconfigure(0, weight=1) + self.inputWdg.focus_set() + + def run(self, evt=None, globs=None, locs=None): +- script = self.inputWdg.get(1.0, Tkinter.END) ++ script = self.inputWdg.get(1.0, tkinter.END) + + # replace x = Tk() with x = Toplevel() + tkPat = re.compile(r"^(.*=\s*)(:?ROStd)?Tk\(\)(.*)$", re.MULTILINE) +@@ -118,26 +118,26 @@ class PythonWdg(Tkinter.Frame): + globs = __main__.__dict__ + if locs is None: + locs = globs +- exec script in globs, locs ++ exec(script, globs, locs) + + def open(self): +- filePath = tkFileDialog.askopenfilename() ++ filePath = tkinter.filedialog.askopenfilename() + if not filePath: + return + filePath = RO.CnvUtil.asStr(filePath) +- top = Tkinter.Toplevel(self.master, ) ++ top = tkinter.Toplevel(self.master, ) + top.title(os.path.basename(filePath)) + frame = PythonWdg(top, filePath=filePath) +- frame.pack(expand=Tkinter.YES, fill=Tkinter.BOTH) ++ frame.pack(expand=tkinter.YES, fill=tkinter.BOTH) + + def save(self, forPrt=None): +- script = self.inputWdg.get(1.0, Tkinter.END) ++ script = self.inputWdg.get(1.0, tkinter.END) + if not script: + return + if forPrt: + filePath = 'prt.tmp' + else: +- filePath = tkFileDialog.asksaveasfilename(initialfile=self.filePath) ++ filePath = tkinter.filedialog.asksaveasfilename(initialfile=self.filePath) + if not filePath: + return + self.filePath = RO.CnvUtil.asStr(filePath) +@@ -152,10 +152,10 @@ class PythonWdg(Tkinter.Frame): + + + if __name__ == '__main__': +- root = Tkinter.Tk() ++ root = tkinter.Tk() + + testFrame = PythonWdg(root) + root.geometry("+0+450") +- testFrame.pack(expand=Tkinter.YES, fill=Tkinter.BOTH) ++ testFrame.pack(expand=tkinter.YES, fill=tkinter.BOTH) + + root.mainloop()