Am Mittwoch, 26. Oktober 2011 um 07:07:47, schrieb Stephan Witt <st.w...@gmx.net> > Am 26.10.2011 um 02:07 schrieb Julien Rioux: > > > 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. > > Fallback to `python' when no suitable python interpreter is found (will > > fail at runtime, but as far as the build system is concerned you can still > > build LyX without python as long as no po files updates are necessary). > > > > Cmake implementation missing. Comments welcome!
But trivial. Would be like the attached (Top-level CMakeLists.txt) I cannot test it, on newest ubuntu is still version <3 installed. > I'm afraid this makes it more difficult to build a LyX package for > distribution. > A package (e.g. .rpm) built this way doesn't work without hacks on a system > with a > different python major version. But I don't know how important this scenario > is > these days. If LyX is build and installed as part of a given linux > distribution > it should fit the bill. Not so with cmake :) > Stephan Kornel
Index: CMakeLists.txt =================================================================== --- CMakeLists.txt (Revision 39960) +++ CMakeLists.txt (Arbeitskopie) @@ -439,7 +439,7 @@ endif() if(LYX_NLS) - FIND_PROGRAM(LYX_PYTHON_EXECUTABLE python HINTS ${GNUWIN32_DIR}/python) + FIND_PROGRAM(LYX_PYTHON_EXECUTABLE python2 python HINTS ${GNUWIN32_DIR}/python) if(${LYX_PYTHON_EXECUTABLE} MATCHES "-NOTFOUND") message(FATAL_ERROR "Python 2.6 needed!") endif()
signature.asc
Description: This is a digitally signed message part.