468,306 Members | 1,421 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,306 developers. It's quick & easy.

How does sysconfig.get_config_vars() get config info...


I'm trying to cross compile a C extension - on a i686 linux box,
targeting a ppc-linux box.

global _config_vars
if _config_vars is None:

What I don't understand is, on the first invocation of
get_config_vars(), _config_vars is not None - and how does
it get populated. According to the comments, the makefile
of the build (i686) python is read for the config info.

However, since my os.name is Tho my system is "posix",
I would expect _posix_init() to get invoked, but it doesn't.
Dropped some prints in all the places where _config_vars
is set, but none get triggered ...

Since its picking up the build (i686) python config info
somewhere, I'm hoping to intervenw and in this cross
compile case, force it to use the makefile of the target
(ppc) python... if only I knew where its being read in...

I even renamed the build (i686) python makefile to see
if I can observe an alternate codepath, but _config_vars
still has the build (i686) python config info.

If only I could get it to look at the target python config
info, I can have it use the linker for the target and build
the target .so... By using the $CC env option, I was
able to have build (i686) python use my cross-gcc (ppc),
so I can generate the .o's for the pcc target... need to
just override the linker to use the cross-linker (ie
cross-gcc itself)...

Any help appreciated...
Thanks much,

Oct 14 '06 #1
0 1051

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

2 posts views Thread by Vicky via DotNetMonster.com | last post: by
5 posts views Thread by Jeff | last post: by
3 posts views Thread by Blasting Cap | last post: by
5 posts views Thread by Andy B | last post: by
reply views Thread by NPC403 | last post: by
reply views Thread by Teichintx | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.