[MacPorts] #51931: frescobaldi[-devel]: NameError: global name '_' is not defined
#51931: frescobaldi[-devel]: NameError: global name '_' is not defined ---------------------+------------------------------------------- Reporter: mojca@… | Owner: davide.liessi@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: Keywords: | Port: frescobaldi frescobaldi-devel ---------------------+------------------------------------------- I opened an upstream issue as well: * https://github.com/wbsoft/frescobaldi/issues/843 I installed frescobaldi-devel, but I'm unable to run it: {{{ Traceback (most recent call last): File "/opt/local/bin/frescobaldi", line 13, in <module> main.main() # Parse command line, create windows etc File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7 /site-packages/frescobaldi_app/main.py", line 185, in main args = parse_commandline() File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7 /site-packages/frescobaldi_app/main.py", line 53, in parse_commandline argparse._ = _ # let argparse use our translations NameError: global name '_' is not defined }}} I tried to explicitly set a python from MacPorts, but that didn't really help. Unrelated (and to be put in a separate ticket eventually): I believe that the port should do some reinplace and use the Python interpreter provided by MacPorts if you want to rely on existence of pyqt. -- Ticket URL: <https://trac.macports.org/ticket/51931> MacPorts <https://www.macports.org/> Ports system for OS X
#51931: frescobaldi[-devel]: NameError: global name '_' is not defined --------------------------------------------+----------------------------- Reporter: mojca@… | Owner: davide.liessi@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: Resolution: | Keywords: Port: frescobaldi frescobaldi-devel | --------------------------------------------+----------------------------- Comment (by dali43@…): I've never seen this problem. I've just tried running Frescobaldi in Snow Leopard and El Capitan and it works as expected. I'll think about this. Replying to [ticket:51931 mojca@…]:
I tried to explicitly set a python from MacPorts, but that didn't really help.
What do you mean?
Unrelated (and to be put in a separate ticket eventually): I believe that the port should do some reinplace and use the Python interpreter provided by MacPorts if you want to rely on existence of pyqt.
As far as I understand there's no need for reinplace, since this is done in the destroot phase by Python itself: the first line in my copy of `/opt/local/bin/frescobaldi` says {{{ #!/opt/local/Library/Frameworks/Python.framework/Versions/2.7/Resources/Python.app/Contents/MacOS/Python }}} -- Ticket URL: <https://trac.macports.org/ticket/51931#comment:1> MacPorts <https://www.macports.org/> Ports system for OS X
#51931: frescobaldi[-devel]: NameError: global name '_' is not defined --------------------------------------------+----------------------------- Reporter: mojca@… | Owner: davide.liessi@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: Resolution: | Keywords: Port: frescobaldi frescobaldi-devel | --------------------------------------------+----------------------------- Comment (by mojca@…): I'm sorry about that stupid reinplace remark. Being used to see the short `/opt/local/bin/perl5.24` my subconscious mind skipped over the initial `/opt/local` in the path you mention above (I was probably expecting something like `/opt/local/bin/python2.7` :) and I thought that the system python from `/Library/Frameworks` was being referenced. Please ignore that part. The main problem still remains though. I asked on the python mailing list and some devs claimed that it seemed strange to them that the code worked at all. Some suggested that lines like `gettext.install()` might be missing in the code (https://docs.python.org/2/library/gettext.html), but I have no idea how `pyqt` is supposed to handle translations, so I don't know any way forward (and also don't want to "blame myself" with stupidities on the upstream bug tracker as I'm not a python expert). -- Ticket URL: <https://trac.macports.org/ticket/51931#comment:2> MacPorts <https://www.macports.org/> Ports system for OS X
#51931: frescobaldi[-devel]: NameError: global name '_' is not defined --------------------------------------------+----------------------------- Reporter: mojca@… | Owner: davide.liessi@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: Resolution: | Keywords: Port: frescobaldi frescobaldi-devel | --------------------------------------------+----------------------------- Comment (by dali43@…): As we discussed in the [https://github.com/wbsoft/frescobaldi/issues/843 upstream tracker], the error is due to an incompatibility between `frescobaldi` and `py27-future`. Given that the current version of Frescobaldi supports Python 3 and future versions will not run with Python 2, rather than adding `conflicts py27-future` and/or adding variants for both Python 2 and 3, I'll move `frescobaldi` to the latest stable Python 3. Should I increase revision for this change? Probably yes, but since current installations work (unless `py27-future` is installed), I'm not sure... -- Ticket URL: <https://trac.macports.org/ticket/51931#comment:3> MacPorts <https://www.macports.org/> Ports system for OS X
#51931: frescobaldi[-devel]: NameError: global name '_' is not defined --------------------------------------------+----------------------------- Reporter: mojca@… | Owner: davide.liessi@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: Resolution: | Keywords: Port: frescobaldi frescobaldi-devel | --------------------------------------------+----------------------------- Comment (by mojca@…): Yes, you should certainly increase the revision after this kind of a change, else you risk all kinds of other problems. -- Ticket URL: <https://trac.macports.org/ticket/51931#comment:4> MacPorts <https://www.macports.org/> Ports system for OS X
#51931: frescobaldi[-devel]: NameError: global name '_' is not defined --------------------------------------------+----------------------------- Reporter: mojca@… | Owner: davide.liessi@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: Resolution: | Keywords: Port: frescobaldi frescobaldi-devel | --------------------------------------------+----------------------------- Comment (by dali43@…): Mojca: could you please apply the patch? Thanks. -- Ticket URL: <https://trac.macports.org/ticket/51931#comment:5> MacPorts <https://www.macports.org/> Ports system for OS X
#51931: frescobaldi[-devel]: NameError: global name '_' is not defined --------------------------------------------+----------------------------- Reporter: mojca@… | Owner: davide.liessi@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: Resolution: | Keywords: Port: frescobaldi frescobaldi-devel | --------------------------------------------+----------------------------- Comment (by davide.liessi@…): (Just for the record, the patch and comments 1, 3 and 5 are still by me, logged in with the wrong account.) -- Ticket URL: <https://trac.macports.org/ticket/51931#comment:6> MacPorts <https://www.macports.org/> Ports system for OS X
#51931: frescobaldi[-devel]: NameError: global name '_' is not defined --------------------------------------------+----------------------------- Reporter: mojca@… | Owner: davide.liessi@… Type: defect | Status: closed Priority: Normal | Milestone: Component: ports | Version: Resolution: fixed | Keywords: Port: frescobaldi frescobaldi-devel | --------------------------------------------+----------------------------- Changes (by mojca@…): * status: new => closed * resolution: => fixed Comment: Thank you, r150933. -- Ticket URL: <https://trac.macports.org/ticket/51931#comment:7> MacPorts <https://www.macports.org/> Ports system for OS X
participants (1)
-
MacPorts