[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

[PATCH] Enable running autogen.sh with Python <2.1

From: Kobayashi Noritada <nori1_at_dolphin.c.u-tokyo.ac.jp>
Date: 2005-10-15 07:35:26 CEST

Hi,

In my environment with Python 2.1, autogen.sh fails in the trunk and
in the 1.3.x branch due to the scope issue of a variable in
build/generator/gen_make.py.
This patch enable running autogen.sh with Python <2.1 as well as >2.2.

May I commit it?
(or require building from autogen.sh with Python >2.2?)

Thanks,

- nori

[[[
Enable running autogen.sh with Python <2.1, in which the scope of variables
within lambda is restricted.

* build/generator/gen_make.py (Generator.write):
  Make use of the 'for' loop instead of map and lambda so as to resolve the
  scope issue with Python <2.1.
]]]

Index: build/generator/gen_make.py
===================================================================
--- build/generator/gen_make.py (revision 16723)
+++ build/generator/gen_make.py (working copy)
@@ -154,7 +154,9 @@
     python_script = "$(abs_srcdir)/build/generator/swig/external_runtime.py"
     build_runtime = '$(PYTHON) %s ' % python_script + \
       '$(abs_srcdir)/build.conf "$(SWIG)"'
- runtimes = map(lambda lang: runtime_pattern % lang, self.swig_lang)
+ runtimes = []
+ for lang in self.swig_lang:
+ runtimes.append (runtime_pattern % lang)
     self.ofile.write(
       '%s:\n' % " ".join(runtimes) +
       '\t%s\n' % build_runtime +

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Sat Oct 15 07:36:05 2005

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.