Skip to content

_sysconfigdata.py doesn't support multiple build configurations #58979

Closed

Description

@davidmalcolm
BPO 14774
Nosy @pitrou, @tpn, @merwok, @davidmalcolm

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 = None
closed_at = <Date 2012-10-13.17:22:05.986>
created_at = <Date 2012-05-10.19:47:33.515>
labels = ['type-bug', 'build']
title = "_sysconfigdata.py doesn't support multiple build configurations"
updated_at = <Date 2012-10-13.17:22:05.984>
user = 'https://github.com/davidmalcolm'

bugs.python.org fields:

activity = <Date 2012-10-13.17:22:05.984>
actor = 'trent'
assignee = 'none'
closed = True
closed_date = <Date 2012-10-13.17:22:05.986>
closer = 'trent'
components = ['Build']
creation = <Date 2012-05-10.19:47:33.515>
creator = 'dmalcolm'
dependencies = []
files = []
hgrepos = []
issue_num = 14774
keywords = []
message_count = 5.0
messages = ['160366', '160367', '160385', '160401', '172814']
nosy_count = 5.0
nosy_names = ['pitrou', 'trent', 'eric.araujo', 'Arfrever', 'dmalcolm']
pr_nums = []
priority = 'normal'
resolution = 'duplicate'
stage = None
status = 'closed'
superseder = None
type = 'behavior'
url = 'https://bugs.python.org/issue14774'
versions = ['Python 3.3']

Activity

  1. davidmalcolm commented on May 10, 2012

    @davidmalcolm
    MemberAuthor

    When building from source, if I create multiple configuration directories and build from there e.g.:

    mkdir configs
    cd configs
    mkdir config-A
    cd config-A
    ../../configure
    make
    cd ..
    mkdir config-B
    cd config-B
    ../../configure --enable-shared
    make
    cd ../config-A
    ./python -c "import sysconfig; print(sysconfig.get_config_var('CONFIG_ARGS')

    then sysconfig's settings are the same for *every* config, reflecting those of the last build (config-B above, rathern than those of config-A).

    This turns out to be due to this:
    ./python -SE -m sysconfig --generate-posix-vars
    This generates $(srcdir)/Lib/_sysconfigdata.py for whichever config was last

    Is there a way of fixing this whilst keeping it a python file? Or do we need to build from a C file, perhaps?

  2. added
    build
    type-bug
    on May 10, 2012
  3. davidmalcolm commented on May 10, 2012

    @davidmalcolm
    MemberAuthor

    Note to self: workaround is to
    rm ../../Lib/_sysconfigdata.py || make ../../Lib/_sysconfigdata.py
    before running my tests in either configuration, to force the file to be regenerated using what "make" thinks the settings are

  4. merwok commented on May 10, 2012

    @merwok
    Member

    Would always recreating _sysconfigdata.py solve the problem?

  5. pitrou commented on May 11, 2012

    @pitrou
    Member

    Is there a way of fixing this whilst keeping it a python file? Or do
    we need to build from a C file, perhaps?

    Well I hope we don't make it a C file just for that reason. It would complicate the generation code quite a bit (right now it's just 3 lines long).

    I tend to use separate clones myself (actually, I use "hg share" to avoid multiple pulls).

  6. tpn commented on Oct 13, 2012

    @tpn
    Member

    I'm pretty sure this is a duplicate of http://bugs.python.org/issue15298 (which should be fixed shortly).

    Feel free to re-open if I'm wrong.

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

No one assigned

    Labels

    buildtype-bug

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions