[Scons-users] Scons using msys/mingw.

Bill Deegan bill at baddogconsulting.com
Sun Feb 10 12:14:53 EST 2013


Jos,

SCons is good with cross platform, but msys is sort of cross/cross
platform.. :)

Hopefully when we rework our tools infrastructure we'll be able to handle
this better.

-Bill

On Sun, Feb 10, 2013 at 1:48 AM, Jos De Laender <jos at de-laender.be> wrote:


>

> Hi Dimitri,

>

> Thanks for the extensive answer.

> It is what I was already afraid of ... though glad it is 'doable'.

> Probably I just expected a little bit too much of 'cross-platform' ...

>

> Jos

>

> Op 10-02-13 05:51, Dmitry Mikhin schreef:

>

> Hi Jos,

>>

>> I have a fairly big and multi-lingual project

>> (C/C++/Fortran/Python/LaTeX/**RPM or InnoSetup/etc.) built under mingw

>> and linux. Uses native Python on Windows.

>>

>> Overall, it is not only a question whether msys Python is like the

>> Unix one. The MinGW SCons calls cmd.exe shell whenever using any

>> external program, and therefore, paths passed into the DOS shell must

>> conform. Also, some utilities and compilers were happy with Unix-style

>> paths in their arguments, while others insisted on '\\\\'. Sometimes

>> it was down to how the string would be used: in a shell invocation or

>> in Python code. Every time it was try and error. So, both converting

>> all arguments to Windows-style did not work, and leaving it all Unix

>> style did not work, at least in my case.

>>

>> A brief run over the changes I had to make:

>> - religious use of os.path, os.sep, os.pathsep, os.path.join, and friends.

>> - safeguarding escapes, as in p.replace('/', '\\\\').replace('\\', '\\\\')

>> - for unknown reason had to use duplicate=1 in VariantDir

>> - adding resource files, icons, etc. on Windows

>> - switching between *.sh and *.bat versions of my own, in-project scripts,

>> - bypassing use of fifo pipes when on Windows

>> - switching between RPM/InnoSetup as needed

>> - no '-fPIC'

>> - adding env['PROGSUFFIX'] whenever searching with WhereIs

>> - selecting between 'cmp' and 'fc /b', 'copy' and 'cp', 'move' and

>> 'mv' whenever these were invoked directly.

>>

>> The main effort was in the first two items. Regrettably, there was no

>> common recipe with safeguarding, as explained above. Hey, it worked!

>>

>> Best of luck,

>> Dmitry

>>

>> On Sun, Feb 10, 2013 at 8:45 AM, Jos De Laender <jos at de-laender.be>

>> wrote:

>>

>>> Gents,

>>>

>>> I have a fairly common problem. Nevertheless I don't succeed finding a

>>> successful path ...

>>>

>>> The project is a linux project that is replicated in msys/mingw.

>>>

>>> There are some issues with the default compiler, but those I can manage

>>> with

>>> a little help of google.

>>>

>>> The real issue is though that I have install paths and alike that should

>>> be

>>> expressed in msys separators ('/') even though the os specific one is

>>> '\'.

>>> There I go nuts ...

>>> It appeared to me that building python on msys would be the way to go,

>>> but

>>> much to my surprise that seems far from straightforward ..

>>> (and no thanks, I don't want to pull in cygwin :)).

>>>

>>> Someone got this issue before ? So I'm looking for two potential

>>> resolutions

>>> :

>>> - Setting the separator, independently ...

>>> or

>>> - Building python under msys (assuming that then it will behave like a

>>> linux

>>> one ...)

>>>

>> ______________________________**_________________

>> Scons-users mailing list

>> Scons-users at scons.org

>> http://four.pairlist.net/**mailman/listinfo/scons-users<http://four.pairlist.net/mailman/listinfo/scons-users>

>>

>>

>

> --

> Jos De Laender

> www.jodela.be

>

> ______________________________**_________________

> Scons-users mailing list

> Scons-users at scons.org

> http://four.pairlist.net/**mailman/listinfo/scons-users<http://four.pairlist.net/mailman/listinfo/scons-users>

>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://four.pairlist.net/pipermail/scons-users/attachments/20130210/3aca19dc/attachment.html>


More information about the Scons-users mailing list