[Scons-users] Seeking help getting scons up on windows with MinGW

M Busche spammymatt94 at yahoo.com
Wed Jun 20 01:15:27 EDT 2012


Evan,

Thankyou for your response.

So are you saying there's another version of python/scons out there I could have installed that behaves better with MinGW?

Also, I looked at /usr/bin/scons on Ubuntu again.  It's NOT a shell script -- it's a python script.  My mistake.  At first glance it looks like the same file as /c/Python27/Scripts/scons.py.

Knowing that unbuntu's scons and windows scons.py are the same thing (more-or-less) and knowing there is at least one other person out there with a similar setup experience, I was emboldened to try the following:

1. copying /c/Python27/Scripts/scons.py to /c/Python27/Scripts/scons
2. Modifying the first line of my new scons file from

            #! /usr/bin/env python

      to

            #! /usr/bin/env /c/Python27/python.exe

Quite likely this will damn me to some new software hell, but it at least passes the version test:

$ scons --version
SCons by Steven Knight et al.:
        script: v2.1.0.r5357[MODIFIED], 2011/09/09 21:31:03, by bdeegan on ubuntu
        engine: v2.1.0.r5357[MODIFIED], 2011/09/09 21:31:03, by bdeegan on ubuntu
        engine path: ['c:\\Python27\\Lib\\site-packages\\scons-2.1.0\\SCons']
Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 The SCons Foundation

Thanks again,
Matt


----- Original Message -----
From: Evan Driscoll <driscoll at cs.wisc.edu>
To: M Busche <spammymatt94 at yahoo.com>; SCons users mailing list <scons-users at scons.org>
Cc:
Sent: Tuesday, June 19, 2012 10:11 PM
Subject: Re: [Scons-users] Seeking help getting scons up on windows with MinGW

On Tuesday, June 19, 2012 08:58:37 PM M Busche wrote:

> Now I don't think I should be attempting to run scons.bat from a MinGW shell

> prompt.


Ah. I think I've run into the same problem with Cygwin. It works in reverse
too: if you install the {Cygwin,MinGW} Python and Scons, you can't run it
directly from cmd.exe; if you install the Windows version of Python and Scons,
you can't run it directly from Bash.


> I suppose I could attempt to

> write a small scons shell script to turn around and invoke the above.

> Snooping around on my ubuntu box, I see scons there is indeed a shell

> script (and not a trivial one at all!)

>

> OK, I think I'll stop there and let someone tell me what I'm doing wrong.


That's more or less what I've done, to be honest. I don't know for sure there
isn't a better way, but that's the best one I know.

(Actually I did it even more convoluted: my scons Bash wrapper actually runs
'cmd /c scons.bat $@' or something like that. Tweak it a bit to make it
syntactically correct. And when I've done it the other way, I've written an
scons.bat that calls 'bash -c scons %*' or whatever. I like your way better.)

Evan


More information about the Scons-users mailing list