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

Re: [PATCH] Use subprocess in gen_win.py

From: Arfrever Frehtes Taifersar Arahesis <Arfrever.FTA_at_GMail.Com>
Date: Sat, 25 Apr 2009 03:24:54 +0200

2009-04-24 22:59:27 Paul Burba napisaƂ(a):
> On Fri, Apr 24, 2009 at 2:52 PM, Arfrever Frehtes Taifersar Arahesis
> <Arfrever.FTA_at_gmail.com> wrote:
> > Using of os.popen4 in build/generator/gen_win.py probably causes
> > "DeprecationWarning: os.popen4 is deprecated. Use the subprocess module.".
> >
> > I'm attaching the patch which fixes this problem.
> > I don't use Windows, so I cannot test this patch, so I'm not committing it directly.
> >
> > [[[
> > * build/generator/gen_win.py
> > (WinGeneratorBase._find_swig): Use subprocess instead of os.popen4()
> > for compatibility with Python 3.
> > ]]]
> >
> > --
>
> Arfrever,
>
> The patch doesn't work for me on trunk_at_37468.
>
> Without the patch my build finds swig:
>
> [[[
> C:\SVN\src-trunk>python --version
> Python 2.6.1
>
> C:\SVN\src-trunk>vc6-build.bat
>
> C:\SVN\src-trunk>set APACHE_INSTALL_DIR=C:\Apache22
>
> C:\SVN\src-trunk>set APACHE_SOURCE_ROOT=C:\SVN\httpd-2.2.10
>
> C:\SVN\src-trunk>set VER=trunk
>
> C:\SVN\src-trunk>set SUBVERSION_SOURCE_ROOT=C:\SVN\src-trunk
>
> C:\SVN\src-trunk>set BUILD=Release
>
> C:\SVN\src-trunk>cd C:\SVN\src-trunk
>
> C:\SVN\src-trunk>gen-make.py -t vcproj --vsnet-version=2008
> --with-httpd=C:\SVN\httpd-2.2.10 --with-openssl=C:\SVN\openssl
> --with-berkeley-db=C:\SVN\bdb --with-apr=C:\SVN\httpd-2.2
> .10\srclib\apr --with-apr-util=C:\SVN\httpd-2.2.10\srclib\apr-util
> --with-zlib=C:\SVN\zlib --enable-bdb-in-apr-util
> --with-swig=C:\SVN\swig --with-junit="C:\Program Files\Java\jdk1
> .6.0_07\jre\lib\ext\junit-4.4.jar" --with-sqlite=C:\SVN\sqlite3.6.10
> --with-serf=C:\SVN\serf --with-neon=C:\SVN\neon
> build\generator\gen_vcnet_vcproj.py:6: DeprecationWarning: the md5
> module is deprecated; use hashlib instead
> import md5
> Found libdb47.lib in C:\SVN\bdb
> Generating for VS.NET 2008
> Could not detect Ruby version.
> Ruby bindings will be linked with msvcrt-ruby18.lib
> Found installed perl version number.
> Perl bindings will be linked with perl510.lib
> Found installed SWIG version 1.3.36
> Using SWIG library directory C:\SVN\swig\Lib
> Found JDK version 1.6 in C:\Program Files\Java\jdk1.6.0_07
> Found SQLite version 3.6.10
> Found neon version 0.28.2
> ...
> ]]]
>
> But with the patch it does not:
>
> [[[
> C:\SVN\src-trunk>vc6-build.bat
>
> C:\SVN\src-trunk>set APACHE_INSTALL_DIR=C:\Apache22
>
> C:\SVN\src-trunk>set APACHE_SOURCE_ROOT=C:\SVN\httpd-2.2.10
>
> C:\SVN\src-trunk>set VER=trunk
>
> C:\SVN\src-trunk>set SUBVERSION_SOURCE_ROOT=C:\SVN\src-trunk
>
> C:\SVN\src-trunk>set BUILD=Release
>
> C:\SVN\src-trunk>cd C:\SVN\src-trunk
>
> C:\SVN\src-trunk>gen-make.py -t vcproj --vsnet-version=2008
> --with-httpd=C:\SVN\httpd-2.2.10 --with-openssl=C:\SVN\openssl
> --with-berkeley-db=C:\SVN\bdb --with-apr=C:\SVN\httpd-2.2
> .10\srclib\apr --with-apr-util=C:\SVN\httpd-2.2.10\srclib\apr-util
> --with-zlib=C:\SVN\zlib --enable-bdb-in-apr-util
> --with-swig=C:\SVN\swig --with-junit="C:\Program Files\Java\jdk1
> .6.0_07\jre\lib\ext\junit-4.4.jar" --with-sqlite=C:\SVN\sqlite3.6.10
> --with-serf=C:\SVN\serf --with-neon=C:\SVN\neon
> build\generator\gen_vcnet_vcproj.py:6: DeprecationWarning: the md5
> module is deprecated; use hashlib instead
> import md5
> Found libdb47.lib in C:\SVN\bdb
> Generating for VS.NET 2008
> Could not detect Ruby version.
> Ruby bindings will be linked with msvcrt-ruby18.lib
> Found installed perl version number.
> Perl bindings will be linked with perl510.lib
> Could not find installed SWIG, assuming version 1.3.25
> Found JDK version 1.6 in C:\Program Files\Java\jdk1.6.0_07
> Found SQLite version 3.6.10
> Found neon version 0.28.2
> C:\SVN\swig\swig not found; skipping SWIG file generation...

Maybe it should be "C:\SVN\swig\swig.exe"...

I'm attaching the new patch.

-- 
Arfrever Frehtes Taifersar Arahesis

Received on 2009-04-25 03:25:12 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.