[Scons-users] Cross-OS Cross-Building

William Blevins wblevins001 at gmail.com
Tue Aug 9 18:04:06 EDT 2016


Fred,

Can you not redefine os.name in site_scons?

http://stackoverflow.com/questions/3692159/how-do-i-redefine-functions-in-python

V/R,
William

On Tue, Aug 9, 2016 at 8:50 PM, Fred Wright <fw at fwright.net> wrote:

>
> I've been looking into some issues with cross-building, and have come
> across a problem:
>
> Setting up the proper target environment has to include setting up the
> proper platform-related settings.  The code that does that is contained in
> platform-related SCons functions that don't directly correspond to the
> normal user-visible platform names.  The code to provide that mapping
> seems to exist solely in the platform_default() function, which takes no
> arguments and gets the values directly from the host Python.
>
> AFAICT, the only way to make this work for a specified target OS is to do
> one of two things:
>
> 1) Duplicate the logic in platform_default(), thereby relying on knowledge
> of SCons internals.
>
> 2) Monkey-patch os.name and sys.platform around a call to
> platform_default(), so that it can be fed the proper values.
>
> Both of these are rather ugly.  Am I missing something?  Is it really true
> that nobody considered the possibility of cross-building for a different
> OS?
>
> Fred Wright
> _______________________________________________
> Scons-users mailing list
> Scons-users at scons.org
> https://pairlist4.pair.net/mailman/listinfo/scons-users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://pairlist4.pair.net/pipermail/scons-users/attachments/20160809/836dd978/attachment-0001.html>


More information about the Scons-users mailing list