[Scons-users] Cross-OS Cross-Building
Fred Wright
fw at fwright.net
Tue Aug 9 18:32:31 EDT 2016
On Tue, 9 Aug 2016, William Blevins wrote:
> Fred,
>
> Can you not redefine os.name in site_scons?
>
> http://stackoverflow.com/questions/3692159/how-do-i-redefine-functions-in-python
That's not the appropriate place, since one doesn't want to make *all*
builds look like a different platform. The platform needs to be set up as
part of the target specification when cross-building.
Fred Wright
> 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
> >
>
More information about the Scons-users
mailing list