classification
Title: Avoid parsing pyconfig.h and Makefile by autogenerating extension module
Type: Stage:
Components: Library (Lib) Versions: Python 3.3
process
Status: open Resolution:
Dependencies: Superseder:
Assigned To: barry Nosy List: Arfrever, barry, carljm, eric.araujo, haypo, michael.foord, nuald, tarek
Priority: normal Keywords:

Created on 2010-09-16 18:08 by barry, last changed 2011-08-21 08:10 by eric.araujo.

Messages (5)
msg116588 - (view) Author: Barry A. Warsaw (barry) * (Python committer) Date: 2010-09-16 18:08
This is splitting one concern from bug 9807 - specifically to avoid parsing pyconfig.h and Makefile in the sysconfig module by autogenerating an extension module (e.g. _sysconfig.c) at build time and using that to get the variables from those two files.
msg116590 - (view) Author: Barry A. Warsaw (barry) * (Python committer) Date: 2010-09-16 18:10
See issue 9807
msg129233 - (view) Author: Michael Foord (michael.foord) * (Python committer) Date: 2011-02-24 00:40
And also issue 10764. This issue affects alternative implementations of Python.
msg142577 - (view) Author: STINNER Victor (haypo) * (Python committer) Date: 2011-08-20 22:21
"avoid parsing pyconfig.h and Makefile in the sysconfig module by autogenerating an extension module"

This feature will be appreciated by small devices embeding Python: on such device, headers and Makefile are not copied to not waste disk space.

To me, it is also an horrible thing to parse pyconfig.h and Makefile at startup, because these files are non trivial to parse and it should be done only once. Because these files are created one, we should parse them once, when Python is compiled. So an "autogenerating an extension module" is an excellent idea. It will speed up Python startup.
msg142596 - (view) Author: Éric Araujo (eric.araujo) * (Python committer) Date: 2011-08-21 08:10
I wouldn’t call this a performance issue.  From #4359, you can see that the two main reasons are first to avoid breakage on platforms that put pyconfig.h and Makefile in another package than the interpreter, and most importantly than the code is hard to maintain.  Resource usage diminution will just be a nice side-effect.
History
Date User Action Args
2011-08-21 08:10:26eric.araujosettype: performance ->
messages: + msg142596
versions: + Python 3.3, - Python 3.2
2011-08-20 22:21:19hayposettype: performance

messages: + msg142577
nosy: + haypo
2011-08-20 21:01:23Arfreversetnosy: + Arfrever
2011-07-14 23:33:00nualdsetnosy: + nuald
2011-03-14 00:01:13carljmsetnosy: + carljm
2011-02-24 00:45:10eric.araujounlinkissue10764 superseder
2011-02-24 00:40:28michael.foordsetnosy: + michael.foord
messages: + msg129233
2010-12-28 17:55:44amaury.forgeotdarclinkissue10764 superseder
2010-10-21 22:49:06eric.araujolinkissue4359 superseder
2010-09-16 20:28:04eric.araujosetnosy: + tarek, eric.araujo
2010-09-16 18:10:13barrysetmessages: + msg116590
2010-09-16 18:08:40barrycreate