lilypond-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Distributions upgrading to Python 3


From: Matthias Kilian
Subject: Re: Distributions upgrading to Python 3
Date: Fri, 22 Oct 2010 22:21:58 +0200
User-agent: Mutt/1.4.2.3i

On Tue, Oct 19, 2010 at 12:07:29AM +0100, Graham Percival wrote:
> >> python/ yes, since it's not something that people call manually.
> >> But stuff in scripts/build/ shouldn't have @PYTHON@, otherwise
> >> it'll bork if you call it manually.
> >
> > But are those scripts supposed to be used without runnig autogen.sh
> > (and implied configure) first?
> 
> Anything that's used to build the website (as opposed to the html
> version of the docs) cannot rely on configure.  This affects
> scripts/build/ create-*.py website_post.py bib2texi.py
> 
> ... admittedly, those are getting called with
>     python scripts/build/foo.py
> , probably precisely to avoid this problem.  So I guess that's not a concern.

Oh, it would still be better to use something like

PYTHON?=python
...
WEB_POST=${PYTHON} $(script-dir)/website_post.py

in files like make/website.make (but probably only of people using
this part start to complain about annoyances).


> > #!/usr/bin/env YOUR_FAVORITE_INTERPRETER
> >
> > should not be used ever. At least not for scripts that will be
> > installed system-wide.
> 
> Why not?  IIRC, we had to add this to work around some problem in OSX.
>  The discussion is in the email archives... hopefully somebody can dig
> it out for us.

I didn't dig it yet, but for OSX (and every system where people
have to rely on binary installers provided by lilypond.org) it may
be that different OSX versions have python installed in different
locations. If my guess is correct, it would be nice if someone could
hack on the OSX binary to do some post-install patching on the
installed python scripts.

> If there's a good reason not to do this, and a better way of solving
> whatever problem we solved with /usr/bin/env python, I welcome a
> change.

The good reason is: whatever you install system-wide with a
#!/usr/bin/env line is out of your control. It immediately depends
on the users PATH. Ignoring security issues for now, #!/usr/bin/env
may trigger completely unexpected (for lilypond developers, or OS
package maintainers) behaviour on a users system.

Ciao,
        Kili



reply via email to

[Prev in Thread] Current Thread [Next in Thread]