[issue9877] Expose sysconfig._get_makefile_filename() in public API
Antoine Pitrou
report at bugs.python.org
Mon Sep 20 14:21:16 CEST 2010
Antoine Pitrou <pitrou at 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 <report at bugs.python.org>
<http://bugs.python.org/issue9877>
_______________________________________
More information about the Python-bugs-list
mailing list