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

Re: svn commit: r33335 - in trunk: . build build/generator build/generator/swig build/win32

From: Greg Stein <gstein_at_gmail.com>
Date: Sun, 28 Sep 2008 18:50:19 -0700

Oop. Yeah!

Arfrever: the cause is from lines like:

  print a, b
became:
  print(a,b)

in Python < 3.0, that is printing out a tuple. The correct conversion is:

  print("%s %s" % (a, b))

in many cases, A is a string, so a typical conversion might be:

  print "Path:", foo
to:
  print("Path: %s" % foo)

Cheers,
-g

On Sun, Sep 28, 2008 at 6:42 PM, Lieven Govaerts <svnlgo_at_mobsol.be> wrote:
> arfrever_at_tigris.org wrote:
>> Author: arfrever
>> Date: Sun Sep 28 08:06:24 2008
>> New Revision: 33335
>>
>> Log:
>> Python 3 compatibility:
>> Update calls to print() in 'build' directory, 'gen-make.py' and 'win-tests.py'.
>>
>> * build/generator/extractor.py:
>> * build/generator/gen_win.py:
>> * build/generator/swig/checkout_swig_header.py:
>> * build/generator/swig/external_runtime.py:
>> * build/generator/swig/header_wrappers.py:
>> * build/get-py-info.py:
>> * build/getversion.py:
>> * build/run_tests.py:
>> * build/strip-po-charset.py:
>> * build/win32/make_dist.py:
>> * gen-make.py:
>> * win-tests.py: Call print() or <file>.write().
>
> This change breaks the swig build on the Mac buildslave, which uses
> Python 2.3.5. I see that in some cases "()" characters are printed in
> the output.
>
> Example 1: Note the '()' around the gcc part.
> /bin/sh: -c: line 1: `/bin/sh
> /Users/lgo/slavedir/osx10.4-gcc4.0.1-ia32/build/libtool --tag=CC
> --silent --mode=compile ('gcc', '-fno-strict-aliasing -Wno-long-double
> -no-cpp-precomp -mno-fused-madd -fno-common -dynamic -DNDEBUG -g -O3
> -Wall -Wstrict-prototypes', '') -DDARWIN
> ..
> /bin/sh: -c: line 1: syntax error near unexpected token `('
>
> Example 2: 'print()' puts '()' on screen.
> lgomac:~/slavedir/osx10.4-gcc4.0.1-ia32/build lgo$ ./gen-make.py --help
> USAGE: gen-make.py [options...] [conf-file]
> -s skip dependency generation
> ..
> vcproj VC.Net project files
> ()
> The default generator type is 'make'
> ()
>
>
> Lieven
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe_at_subversion.tigris.org
> For additional commands, e-mail: dev-help_at_subversion.tigris.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe_at_subversion.tigris.org
For additional commands, e-mail: dev-help_at_subversion.tigris.org
Received on 2008-09-29 03:50:30 CEST

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.