[MacPorts] #25040: lilypond 2.12.3 FTB with Python 3 selected
MacPorts
noreply at macports.org
Wed May 26 10:12:47 PDT 2010
#25040: lilypond 2.12.3 FTB with Python 3 selected
----------------------------+-----------------------------------------------
Reporter: gale@… | Owner: macports-tickets@…
Type: defect | Status: new
Priority: Normal | Milestone:
Component: ports | Version: 1.8.2
Keywords: | Port: lilypond
----------------------------+-----------------------------------------------
The first point is that this port does not have an
explicit dependency on any version of python.
In fact, it works for any 2.4 <= python < 3.
(I tested python27, and from the comments in the
python code it appears to support at least back to 2.4.)
But the port pulls in specifically python25 indirectly via
at least one of its deps, mftrace. So python25 should be
added as an explicit dep of lilypond to show that not
only do we need python25 installed, we need it selected.
Now to the basic issue of not building when Python 3
is selected.
As has been pointed out before, this is going to be an
increasingly common problem, as more and more
MacPorts users make the switch to Python 3 while not
all upstream sources support it yet for the snippets
of Python so many ports contain.
Here is a general solution for when a port depends on a specific
version of Python, not just the case of 3 vs. 2: port
creates its own symlink to the required python version inside
a directory it controls, then pushes that directory onto the
front of PATH for the duration of the build. (Perhaps for
configure also.)
Alternatively, for any particular port, we can try to
create a patch that makes the port's python code
compatible with Python 3. Usually, it's just a matter of
de-tabifying sloppy indentation, and changing
"print >> f" to "f.write". (Thankfully, the Python core
devs have not yet removed support in Python 3 for the
old "%" string formatting operator, as threatened.)
But in some cases the conversion could turn out to
involve real work, so it should really be a job for
upstream. In practice we can't wait for that to
happen; it could take months or years.
So I recommend the PATH hack.
--
Ticket URL: <http://trac.macports.org/ticket/25040>
MacPorts <http://www.macports.org/>
Ports system for Mac OS
More information about the macports-tickets
mailing list