[MacPorts] #19441: gtk-builder-convert incompatible with Python 3
#19441: gtk-builder-convert incompatible with Python 3 ----------------------------+----------------------------------------------- Reporter: gale@… | Owner: macports-tickets@… Type: defect | Status: new Priority: Normal | Milestone: Port Bugs Component: ports | Version: 1.7.1 Keywords: | Port: gtk2 ----------------------------+----------------------------------------------- The python script gtk-builder-convert uses the shell bang {{{ #!/usr/bin/env python }}} to access the python interpreter. So it gets whatever version of python is currently selected as current in MacPorts. But this script is not compatible with version >= 3.0 of Python: the script contains a print statement, but print has changed to a function in version >= 3.0 of Python. There may be additional incompatibilities, I have not checked. Note that this also implies that this port has a runtime dependency on Python which is missing from the portfile. -- Ticket URL: <http://trac.macports.org/ticket/19441> MacPorts <http://www.macports.org/> Ports system for Mac OS
#19441: gtk-builder-convert incompatible with Python 3 ----------------------------+----------------------------------------------- Reporter: gale@… | Owner: macports-tickets@… Type: defect | Status: new Priority: Normal | Milestone: Port Bugs Component: ports | Version: 1.7.1 Keywords: | Port: gtk2 ----------------------------+----------------------------------------------- Comment(by gale@…): See also #19442. -- Ticket URL: <http://trac.macports.org/ticket/19441#comment:1> MacPorts <http://www.macports.org/> Ports system for Mac OS
#19441: gtk-builder-convert incompatible with Python 3 ----------------------------+----------------------------------------------- Reporter: gale@… | Owner: nox@… Type: defect | Status: new Priority: Normal | Milestone: Port Bugs Component: ports | Version: 1.7.1 Keywords: | Port: gtk2 ----------------------------+----------------------------------------------- Changes (by jmr@…): * owner: macports-tickets@… => nox@… -- Ticket URL: <http://trac.macports.org/ticket/19441#comment:2> MacPorts <http://www.macports.org/> Ports system for Mac OS
#19441: gtk-builder-convert incompatible with Python 3 ----------------------------+----------------------------------------------- Reporter: gale@… | Owner: nox@… Type: defect | Status: assigned Priority: Normal | Milestone: Port Bugs Component: ports | Version: 1.7.1 Keywords: | Port: gtk2 ----------------------------+----------------------------------------------- Changes (by nox@…): * status: new => assigned Comment: I'll fix this because of #19440, but you should not report every python3 incompatibility, report them upstream instead. -- Ticket URL: <http://trac.macports.org/ticket/19441#comment:3> MacPorts <http://www.macports.org/> Ports system for Mac OS
#19441: gtk-builder-convert incompatible with Python 3 -----------------------------+---------------------------------------------- Reporter: gale@… | Owner: nox@… Type: defect | Status: closed Priority: Normal | Milestone: Port Bugs Component: ports | Version: 1.7.1 Resolution: fixed | Keywords: Port: gtk2 | -----------------------------+---------------------------------------------- Changes (by nox@…): * status: assigned => closed * resolution: => fixed Comment: r50143. -- Ticket URL: <http://trac.macports.org/ticket/19441#comment:4> MacPorts <http://www.macports.org/> Ports system for Mac OS
#19441: gtk-builder-convert incompatible with Python 3 -----------------------------+---------------------------------------------- Reporter: gale@… | Owner: nox@… Type: defect | Status: closed Priority: Normal | Milestone: Port Bugs Component: ports | Version: 1.7.1 Resolution: fixed | Keywords: Port: gtk2 | -----------------------------+---------------------------------------------- Comment(by gale@…): Unfortunately, with this change the script will now work *only* for python versions >= 3.0. We could expand that to >= 2.6 by adding "from __future__ import print_function" at the top. But it would still fail for < 2.6 which is still quite widespread. I'm afraid that the only practical solution may be to choose a specific major python version, runtime-depend on it, and hard-wire it into the shell-bang. Note that the crash of this script causes the gnome-keyring port to fail to build. You're right that this really needs to be fixed upstream. And I reported it there as you requested (added to related issue http://bugzilla.gnome.org/show_bug.cgi?id=559947 ). But they may be very slow to fix it. On many platforms, there is a standard default python version, chosen conservatively. So it will be a long time before this bug begins showing up very often outside of MacPorts. -- Ticket URL: <http://trac.macports.org/ticket/19441#comment:5> MacPorts <http://www.macports.org/> Ports system for Mac OS
#19441: gtk-builder-convert incompatible with Python 3 -----------------------------+---------------------------------------------- Reporter: gale@… | Owner: nox@… Type: defect | Status: closed Priority: Normal | Milestone: Port Bugs Component: ports | Version: 1.7.1 Resolution: fixed | Keywords: Port: gtk2 | -----------------------------+---------------------------------------------- Comment(by gale@…): Sorry, never mind. It does work. This delays the pain for a while. In Python 3.2 the string format operator "%" is scheduled to be removed. If that actually happens, it will require a whole slew of changes here. Other than that, we should be able to continue to support "any old" Python version for quite a while. -- Ticket URL: <http://trac.macports.org/ticket/19441#comment:6> MacPorts <http://www.macports.org/> Ports system for Mac OS
#19441: gtk-builder-convert incompatible with Python 3 -----------------------------+---------------------------------------------- Reporter: gale@… | Owner: nox@… Type: defect | Status: closed Priority: Normal | Milestone: Port Bugs Component: ports | Version: 1.7.1 Resolution: fixed | Keywords: Port: gtk2 | -----------------------------+---------------------------------------------- Comment(by gale@…): Oh, but you only fixed one of the print statements. There are several. Attached is a replacement patch that fixes all of them. -- Ticket URL: <http://trac.macports.org/ticket/19441#comment:7> MacPorts <http://www.macports.org/> Ports system for Mac OS
#19441: gtk-builder-convert incompatible with Python 3 -----------------------------+---------------------------------------------- Reporter: gale@… | Owner: nox@… Type: defect | Status: reopened Priority: Normal | Milestone: Port Bugs Component: ports | Version: 1.7.1 Resolution: | Keywords: Port: gtk2 | -----------------------------+---------------------------------------------- Changes (by nox@…): * status: closed => reopened * resolution: fixed => -- Ticket URL: <http://trac.macports.org/ticket/19441#comment:8> MacPorts <http://www.macports.org/> Ports system for Mac OS
#19441: gtk-builder-convert incompatible with Python 3 -----------------------------+---------------------------------------------- Reporter: gale@… | Owner: nox@… Type: defect | Status: closed Priority: Normal | Milestone: Component: ports | Version: 1.7.1 Resolution: fixed | Keywords: Port: gtk2 | -----------------------------+---------------------------------------------- Changes (by nox@…): * status: reopened => closed * resolution: => fixed Comment: Patch updated in r50710. -- Ticket URL: <http://trac.macports.org/ticket/19441#comment:10> MacPorts <http://www.macports.org/> Ports system for Mac OS
participants (1)
-
MacPorts