This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

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

Created on 2010-09-16 18:08 by barry, last changed 2022-04-11 14:57 by admin. This issue is now closed.

Messages (7)
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 (vstinner) * (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.
msg202642 - (view) Author: Barry A. Warsaw (barry) * (Python committer) Date: 2013-11-11 19:12
Isn't this already fixed?  We have _sysconfigdata for this now.
msg203305 - (view) Author: Barry A. Warsaw (barry) * (Python committer) Date: 2013-11-18 16:06
I believe this has been fixed for a while.
History
Date User Action Args
2022-04-11 14:57:06adminsetgithub: 54087
2013-11-18 16:06:35barrysetmessages: + msg203305
2013-11-11 19:12:41barrysetstatus: open -> closed
resolution: fixed
messages: + msg202642
2011-08-21 08:10:26eric.araujosettype: performance ->
messages: + msg142596
versions: + Python 3.3, - Python 3.2
2011-08-20 22:21:19vstinnersettype: performance

messages: + msg142577
nosy: + vstinner
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