Antoine Pitrou <pit...@free.fr> added the comment: > >On the other hand, this begs the question of why you want to access > >the Python makefile at all. Is there any information in there that > >isn't currently exposed? I think it would be nice if people could > >completely forget about the existence of that file, and instead have > >nice programmatic APIs to query properties they are interested in. > > In principle I agree that the parsing of pyconfig.h and Makefile are > implementation details that shouldn't matter. I'm working on the bug to > pre-parse these at build time and generate a _sysconfig module that sysconfig > would import.
I don't think you can pre-parse these at build time, since a Python executable doesn't exist. You must adopt the reverse approach: pass all necessary variables on the command-line (e.g. through -DCFLAGS switches) when compiling the _sysconfig module, from the Makefile. (I'm assuming that _sysconfig will have to be built-in rather than dynamically loadable, since it exposes information which is critical for building dynamic modules :-)) ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue9877> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com