[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: Paul Burba <ptburba_at_gmail.com>
Date: Fri, 24 Apr 2009 21:31:29 -0400

On Fri, Apr 24, 2009 at 9:24 PM, Arfrever Frehtes Taifersar Arahesis
<arfrever.fta_at_gmail.com> wrote:
> 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,

Still doesn't work:

# swig is there:

C:\SVN\src-trunk>C:\SVN\swig\swig.exe -version

SWIG Version 1.3.36

Compiled with i586-mingw32msvc-g++ [i686-pc-linux-gnu]
Please see http://www.swig.org for reporting bugs and further information

# But subprocess still isn't executing it:

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.exe not found; skipping SWIG file generation...

C:\SVN\src-trunk>msbuild subversion_vcnet.sln /t:__ALL_TESTS__
/p:Configuration=Debug
Microsoft (R) Build Engine Version 3.5.30729.1
[Microsoft .NET Framework, Version 2.0.50727.3082]
Copyright (C) Microsoft Corporation 2007. All rights reserved.

^CTerminate batch job (Y/N)? y

C:\SVN\src-trunk>

Paul

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=462&dsMessageId=1901314
Received on 2009-04-25 03:32:43 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.