Skip to content

Avoid parsing pyconfig.h and Makefile by autogenerating extension module #54087

Closed

Description

@warsaw
BPO 9878
Nosy @warsaw, @vstinner, @tarekziade, @carljm, @merwok, @voidspace

Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

Show more details

GitHub fields:

assignee = 'https://github.com/warsaw'
closed_at = <Date 2013-11-11.19:12:41.729>
created_at = <Date 2010-09-16.18:08:40.879>
labels = ['library']
title = 'Avoid parsing pyconfig.h and Makefile by autogenerating extension module'
updated_at = <Date 2013-11-18.16:06:35.208>
user = 'https://github.com/warsaw'

bugs.python.org fields:

activity = <Date 2013-11-18.16:06:35.208>
actor = 'barry'
assignee = 'barry'
closed = True
closed_date = <Date 2013-11-11.19:12:41.729>
closer = 'barry'
components = ['Library (Lib)']
creation = <Date 2010-09-16.18:08:40.879>
creator = 'barry'
dependencies = []
files = []
hgrepos = []
issue_num = 9878
keywords = []
message_count = 7.0
messages = ['116588', '116590', '129233', '142577', '142596', '202642', '203305']
nosy_count = 8.0
nosy_names = ['barry', 'vstinner', 'tarek', 'carljm', 'eric.araujo', 'Arfrever', 'michael.foord', 'nuald']
pr_nums = []
priority = 'normal'
resolution = 'fixed'
stage = None
status = 'closed'
superseder = None
type = None
url = 'https://bugs.python.org/issue9878'
versions = ['Python 3.3']

Activity

  1. warsaw commented on Sep 16, 2010

    @warsaw
    MemberAuthor

    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.

  2. self-assigned this
    on Sep 16, 2010
  3. added
    stdlibStandard Library Python modules in the Lib/ directory
    on Sep 16, 2010
  4. warsaw commented on Sep 16, 2010

    @warsaw
    MemberAuthor
  5. voidspace commented on Feb 24, 2011

    @voidspace
    Contributor

    And also bpo-10764. This issue affects alternative implementations of Python.

  6. vstinner commented on Aug 20, 2011

    @vstinner
    Member

    "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.

  7. merwok commented on Aug 21, 2011

    @merwok
    Member

    I wouldn’t call this a performance issue. From bpo-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.

  8. warsaw commented on Nov 11, 2013

    @warsaw
    MemberAuthor

    Isn't this already fixed? We have _sysconfigdata for this now.

  9. warsaw commented on Nov 18, 2013

    @warsaw
    MemberAuthor

    I believe this has been fixed for a while.

  10. transferred this issue fromon Apr 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

stdlibStandard Library Python modules in the Lib/ directory

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions