On Wed, Oct 26, 2011 at 11:08:33AM +0200, Jean-Marc Lasgouttes wrote:
> Le 26/10/2011 02:07, Julien Rioux a écrit :
> >One approach to use the correct `python' (e.g., it could be `python2'
> >because `python' points to version >3.0) is to have configure generate
> >the affected files.
> >
> >Summary:
> >Rename os.cpp -> os.cpp.in
> >Rename configure.py -> configure.py.in
> >Replace `python' with @python@ in those files, to be replaced by
> >configure with the correct name for the python interpreter.
> 
> For os.cpp, I would prefer to add a #define PYTHON in config.h

Yep, either that or modify os::python() such that it finds at runtime
a suitable python and store the result for successive calls.
This would have the advantage that you are not forced to use a specific
python discovered at compile time, but dynamically change it by simply
adjusting the PATH variable and restarting LyX.

> for configure.py is it only for the #! line?

Indeed. I think that is overkill, as any python script is never called
directly but always as "python -tt script.py".

-- 
Enrico

Reply via email to