By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
439,957 Members | 1,969 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 439,957 IT Pros & Developers. It's quick & easy.

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

P: n/a

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 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
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.