On 11/26/2011 09:55 AM, stefano franchi wrote: > Richard, > > the 2.0.2 tarball as of 11/26/2011 does not compile on arch, even > after manually changing the python strings os.ccp and lib/configure.py > to python2. It seems to me that configure is not looking for a > python2 executable, as it does in the trunk version on svn, and > (therefore?) the PYTHON string defaults to python (which on archlinux > is python3). > There was another change required: http://www.lyx.org/trac/changeset/39909/lyx-devel/trunk/po/Makefile.in.in
Apparently, these changes did not make it to branch. I see r39889-92 and r39909 as part of this. To what extent is r39889, which bumped python to 2.4, required for the rest? It might be just r39890, r39891, and r39909/ Anyone have views on what we should do here? Options are: 1. Port some version of the above revisions to branch for 2.0.2 2. Put something in the release notes for people with this problem, and port it for 2.0.3 The patch for branch based upon these revisions is attached. Stefano, can you give it a try? Richard > Here is the compile error: > > python ./lyx_pot.py -b .. -o qt4_l10n.pot -t qt4 ../src/frontends/qt4/ui/*.ui > File "./lyx_pot.py", line 29 > print "Path %s is not under top source directory" % path > ^ > SyntaxError: invalid syntax > > > and here is the head of configure's output: > > configuring LyX version 2.0.2 > checking for build type... release > checking for version suffix... -2-0-2-beta > checking build system type... x86_64-unknown-linux-gnu > checking host system type... x86_64-unknown-linux-gnu > checking target system type... x86_64-unknown-linux-gnu > checking what packaging should be used... posix > checking whether to enable maintainer-specific portions of Makefiles... no > checking for a BSD-compatible install... /bin/install -c > checking whether build environment is sane... yes > checking for a thread-safe mkdir -p... /bin/mkdir -p > checking for gawk... gawk > checking whether make sets $(MAKE)... yes > checking for a Python interpreter with version >= 2.3.4... python > checking for python... /usr/bin/python > checking for python version... 3.2 > checking for python platform... linux2 > checking for python script directory... ${prefix}/lib/python3.2/site-packages > checking for python extension module directory... > ${exec_prefix}/lib/python3.2/site-packages > checking for style of include used by make... GNU > checking for gcc... gcc > checking whether the C compiler works... yes > > > Cheers, > > Stefano > > On Thu, Nov 24, 2011 at 4:20 PM, Richard Heck <rgh...@comcast.net> wrote: >> On 11/24/2011 04:23 PM, Uwe Stöhr wrote: >>>> I'm planning to do a bit more >>>> testing the next couple days, and then I will prepare the release on >>>> Friday, assuming there are no issues. >>> Please postpone it until Monday. Currently branch is not in shape for >>> me and I need more time to test. >>> >> If you wish, we can remove the ctex.lyx template for this release. >> Otherwise, I would think that things would be fine. The new layouts >> >> Richard >> >> > >
>From 8a2abea9066c9ca3beb35fddca58f6e7a2c71bbf Mon Sep 17 00:00:00 2001 From: jrioux <jrioux@a592a061-630c-0410-9148-cb99ea01b6c8> Date: Wed, 19 Oct 2011 20:50:41 +0000 Subject: [PATCH] Backport changes Julien made to deal with Arch's use of "python" for "python3". These were r39898-92 and r39909. git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@39889 a592a061-630c-0410-9148-cb99ea01b6c8 --- config/lyxinclude.m4 | 21 +++++++++++++++++++++ configure.ac | 2 +- po/Makefile.in.in | 2 ++ po/Rules-lyx | 18 +++++++++--------- 4 files changed, 33 insertions(+), 10 deletions(-) diff --git a/config/lyxinclude.m4 b/config/lyxinclude.m4 index c62960a..940a4af 100644 --- a/config/lyxinclude.m4 +++ b/config/lyxinclude.m4 @@ -635,3 +635,24 @@ AC_DEFUN([LYX_SET_VERSION_INFO], AC_SUBST(LYX_DIR_VER,"$lyx_dir_ver") AC_SUBST(LYX_USERDIR_VER,"$lyx_userdir_ver") ]) + +# AM_PYTHON_CHECK_VERSION(PROG, VERSION, [ACTION-IF-TRUE], [ACTION-IF-FALSE]) +# --------------------------------------------------------------------------- +# Copied from autoconf 2.68, added a check that python version is < 3.0 +# Run ACTION-IF-TRUE if the Python interpreter PROG has version >= VERSION. +# Run ACTION-IF-FALSE otherwise. +# This test uses sys.hexversion instead of the string equivalent (first +# word of sys.version), in order to cope with versions such as 2.2c1. +# This supports Python 2.0 or higher. (2.0 was released on October 16, 2000). +AC_DEFUN([AM_PYTHON_CHECK_VERSION], + [prog="import sys +# split strings by '.' and convert to numeric. Append some zeros +# because we need at least 4 digits for the hex conversion. +# map returns an iterator in Python 3.0 and a list in 2.x +minver = list(map(int, '$2'.split('.'))) + [[0, 0, 0]] +minverhex = 0 +maxverhex = 50331648 # = 3.0.0.0 +# xrange is not present in Python 3.0 and range returns an iterator +for i in list(range(0, 4)): minverhex = (minverhex << 8) + minver[[i]] +sys.exit(sys.hexversion < minverhex or sys.hexversion >= maxverhex)" + AS_IF([AM_RUN_LOG([$1 -c "$prog"])], [$3], [$4])]) diff --git a/configure.ac b/configure.ac index 1af09db..8f02987 100644 --- a/configure.ac +++ b/configure.ac @@ -58,7 +58,7 @@ for file in config/install-sh ; do done # Check for installed python -AM_PATH_PYTHON(2.3.4,, :) +AM_PATH_PYTHON(2.4.0,, :) ### we need to know the byte order for unicode conversions AC_C_BIGENDIAN diff --git a/po/Makefile.in.in b/po/Makefile.in.in index 6306477..33534f9 100644 --- a/po/Makefile.in.in +++ b/po/Makefile.in.in @@ -14,6 +14,8 @@ PACKAGE = @PACKAGE@ VERSION = @VERSION@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PYTHON = @PYTHON@ + SHELL = /bin/sh @SET_MAKE@ diff --git a/po/Rules-lyx b/po/Rules-lyx index 8aefa41..7e747ef 100644 --- a/po/Rules-lyx +++ b/po/Rules-lyx @@ -23,34 +23,34 @@ l10n_pots: qt4_l10n.pot layouts_l10n.pot languages_l10n.pot encodings_l10n.pot u qt4_l10n.pot: $(top_srcdir)/src/frontends/qt4/ui/*.ui LC_ALL=C ; export LC_ALL ; \ - python $(srcdir)/lyx_pot.py -b $(top_srcdir) -o $@ -t qt4 ${top_srcdir}/src/frontends/qt4/ui/*.ui + $(PYTHON) $(srcdir)/lyx_pot.py -b $(top_srcdir) -o $@ -t qt4 ${top_srcdir}/src/frontends/qt4/ui/*.ui layouts_l10n.pot: $(top_srcdir)/lib/layouts/*.layout $(top_srcdir)/lib/layouts/*.inc \ $(top_srcdir)/lib/layouts/*.module LC_ALL=C ; export LC_ALL ; \ - python $(srcdir)/lyx_pot.py -b $(top_srcdir) -o $@ -t layouts ${top_srcdir}/lib/layouts/*.layout ${top_srcdir}/lib/layouts/*.inc ${top_srcdir}/lib/layouts/*.module + $(PYTHON) $(srcdir)/lyx_pot.py -b $(top_srcdir) -o $@ -t layouts ${top_srcdir}/lib/layouts/*.layout ${top_srcdir}/lib/layouts/*.inc ${top_srcdir}/lib/layouts/*.module $(top_srcdir)/lib/layouttranslations: $(POFILES) $(top_srcdir)/lib/layouts/*.layout \ $(top_srcdir)/lib/layouts/*.inc $(top_srcdir)/lib/layouts/*.module LC_ALL=C ; export LC_ALL ; \ - python $(srcdir)/lyx_pot.py -b $(top_srcdir) -o $@ -t layouttranslations ${top_srcdir}/lib/layouts/*.layout ${top_srcdir}/lib/layouts/*.inc ${top_srcdir}/lib/layouts/*.module + $(PYTHON) $(srcdir)/lyx_pot.py -b $(top_srcdir) -o $@ -t layouttranslations ${top_srcdir}/lib/layouts/*.layout ${top_srcdir}/lib/layouts/*.inc ${top_srcdir}/lib/layouts/*.module languages_l10n.pot: $(top_srcdir)/lib/languages - python $(srcdir)/lyx_pot.py -b $(top_srcdir) -o $@ -t languages ${top_srcdir}/lib/languages + $(PYTHON) $(srcdir)/lyx_pot.py -b $(top_srcdir) -o $@ -t languages ${top_srcdir}/lib/languages encodings_l10n.pot: $(top_srcdir)/lib/encodings - python $(srcdir)/lyx_pot.py -b $(top_srcdir) -o $@ -t encodings ${top_srcdir}/lib/encodings + $(PYTHON) $(srcdir)/lyx_pot.py -b $(top_srcdir) -o $@ -t encodings ${top_srcdir}/lib/encodings ui_l10n.pot: $(top_srcdir)/lib/ui/*.ui $(top_srcdir)/lib/ui/*.inc LC_ALL=C ; export LC_ALL ; \ - python $(srcdir)/lyx_pot.py -b $(top_srcdir) -o $@ -t ui ${top_srcdir}/lib/ui/*.ui ${top_srcdir}/lib/ui/*.inc + $(PYTHON) $(srcdir)/lyx_pot.py -b $(top_srcdir) -o $@ -t ui ${top_srcdir}/lib/ui/*.ui ${top_srcdir}/lib/ui/*.inc external_l10n.pot: $(top_srcdir)/lib/external_templates - python $(srcdir)/lyx_pot.py -b $(top_srcdir) -o $@ -t external ${top_srcdir}/lib/external_templates + $(PYTHON) $(srcdir)/lyx_pot.py -b $(top_srcdir) -o $@ -t external ${top_srcdir}/lib/external_templates formats_l10n.pot: $(top_srcdir)/lib/configure.py - python $(srcdir)/lyx_pot.py -b $(top_srcdir) -o $@ -t formats ${top_srcdir}/lib/configure.py + $(PYTHON) $(srcdir)/lyx_pot.py -b $(top_srcdir) -o $@ -t formats ${top_srcdir}/lib/configure.py # LyX specific code to generate l10n statistics for the web site i18n.inc: $(POFILES) postats.py - (cd $(srcdir) ; python postats.py "$(VERSION)" $(POFILES)) >$@ + (cd $(srcdir) ; $(PYTHON) postats.py "$(VERSION)" $(POFILES)) >$@ -- 1.7.4.4