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

Gary Oberbrunner garyo at oberbrunner.com
Wed Mar 5 11:07:22 EST 2014


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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://two.pairlist.net/pipermail/scons-dev/attachments/20140305/c92eda13/attachment-0001.htm>


More information about the Scons-dev mailing list