[Scons-dev] Strange behavior of env.Execute(python script) on Windows

Alexandre Feblot alexandre at feblot.fr
Wed Mar 5 11:46:16 EST 2014


Right, that was it. It behaves properly with the official 2.7.6.
On the other hand, the official distrib doesn't package winerror, win32api
and win32con modules which I am using.
Choice time...
Thanks again.


2014-03-05 17:12 GMT+01:00 Alexandre Feblot <alexandre at feblot.fr>:


> I'm using Active State ActivePython 2.7.2.5.

> I'm going to try the official python, then.

> Thanks.

>

>

> 2014-03-05 17:07 GMT+01:00 Gary Oberbrunner <garyo at oberbrunner.com>:

>

> Your example works OK for me; this is only the printpath.py part:

>>

>> scons: Reading SConscript files ...

>> C:\tmp\printpath.py

>> C:\Program Files (x86)\Microsoft Visual Studio

>> 11.0\Common7\IDE\CommonExtensions\Microsoft\TestWindow;C:\Program Files

>> (x86)\Microsoft Visual Studio

>> 11.0\VC\BIN\amd64;c:\Windows\Microsoft.NET\Framework64\v4.0.30319;c:\Windows\Microsoft.NET\Framework64\v3.5;C:\Program

>> Files (x86)\Microsoft Visual Studio 11.0\VC\VCPackages;C:\Program Files

>> (x86)\Microsoft Visual Studio 11.0\Common7\IDE;C:\Program Files

>> (x86)\Microsoft Visual Studio 11.0\Common7\Tools;C:\Program Files

>> (x86)\Microsoft Visual Studio 11.0\Team Tools\Performance

>> Tools\x64;C:\Program Files (x86)\Microsoft Visual Studio 11.0\Team

>> Tools\Performance Tools;C:\Program Files (x86)\Windows

>> Kits\8.0\bin\x64;C:\Program Files (x86)\Windows Kits\8.0\bin\x86;C:\Program

>> Files (x86)\Microsoft SDKs\Windows\v8.0A\bin\NETFX 4.0 Tools\x64;C:\Program

>> Files (x86)\Microsoft SDKs\Windows\v7.0A\bin\x64;C:\Program Files

>> (x86)\Microsoft SDKs\Windows\v8.0A\bin\NETFX 4.0 Tools;C:\Program Files

>> (x86)\Microsoft

>> SDKs\Windows\v7.0A\bin\;C:\Windows\System32;C:\XXXXXXXXXXXXXXXXXXXXXX

>>

>> Are you using cygwin python or real python? I suggest trying real (

>> python.org) python if you're using cygwin. There are some oddities with

>> cygwin python.

>>

>>

>>

>> On Wed, Mar 5, 2014 at 10:31 AM, Alexandre Feblot <alexandre at feblot.fr>wrote:

>>

>>> Hi,

>>> Would any of you have an idea on the behavior of printpath.py in the

>>> small test below? What happens to the PATH? Other variables are transfered

>>> properly. The similar perl test shows the PATH as expected.

>>>

>>> Sconstruct:

>>> env = Environment()

>>> env['ENV']['PATH'] += ';C:\\XXXXXXXXXXXXXXXXXXXXXX'

>>> env.Execute(File('#/printpath.py').abspath)

>>> env.Execute(File('#/printpath.pl').abspath)

>>>

>>> printpath.pl:

>>> #!/usr/bin/perl

>>> print "$ENV{PATH}\n";

>>>

>>> printpath.py:

>>> #!/usr/bin/python

>>> import os

>>> print os.environ['PATH']

>>>

>>> On windows (server 2008R2), with python 2.7.2, the result is:

>>> scons: Reading SConscript files ...

>>> C:\bug\printpath.py

>>> C:\Python27\

>>> C:\bug\printpath.pl

>>> c:\Program Files (x86)\Microsoft Visual Studio

>>> 9.0\VC\BIN\amd64;c:\Windows\Microsoft.NET\Framework64\v3.5;c:\Windows\Microsoft.NET\Framework64\v3.5\Microsoft

>>> .NET Framework 3.5 (Pre-Release

>>> Version);c:\Windows\Microsoft.NET\Framework64\v2.0.50727;c:\Program Files

>>> (x86)\Microsoft Visual Studio 9.0\VC\VCPackages;c:\Program Files

>>> (x86)\Microsoft Visual Studio 9.0\Common7\IDE;c:\Program Files

>>> (x86)\Microsoft Visual Studio 9.0\Common7\Tools;c:\Program Files

>>> (x86)\Microsoft Visual Studio 9.0\Common7\Tools\bin;C:\Program

>>> Files\Microsoft SDKs\Windows\v6.0A\bin\x64;C:\Program Files\Microsoft

>>> SDKs\Windows\v6.0A\bin\win64\x64;C:\Program Files\Microsoft

>>> SDKs\Windows\v6.0A\bin;C:\Windows\System32;C:\XXXXXXXXXXXXXXXXXXXXXX

>>> scons: done reading SConscript files.

>>> scons: Building targets ...

>>> scons: `.' is up to date.

>>> scons: done building targets.

>>>

>>> Thanks

>>>

>>>

>>> _______________________________________________

>>> Scons-dev mailing list

>>> Scons-dev at scons.org

>>> http://two.pairlist.net/mailman/listinfo/scons-dev

>>>

>>>

>>

>>

>> --

>> Gary

>>

>> _______________________________________________

>> Scons-dev mailing list

>> Scons-dev at scons.org

>> http://two.pairlist.net/mailman/listinfo/scons-dev

>>

>>

>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://two.pairlist.net/pipermail/scons-dev/attachments/20140305/ae9bfdc3/attachment.html>


More information about the Scons-dev mailing list