Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
davidmalcolm opened this issue May 10, 2012 · 5 comments
Closed

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

davidmalcolm opened this issue May 10, 2012 · 5 comments
Labels
build The build process and cross-build type-bug An unexpected behavior, bug, or error

Comments

@davidmalcolm
Copy link
Member

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']

@davidmalcolm
Copy link
Member Author

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?

@davidmalcolm davidmalcolm added build The build process and cross-build type-bug An unexpected behavior, bug, or error labels May 10, 2012
@davidmalcolm
Copy link
Member Author

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

@merwok
Copy link
Member

merwok commented May 10, 2012

Would always recreating _sysconfigdata.py solve the problem?

@pitrou
Copy link
Member

pitrou commented May 11, 2012

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

@tpn
Copy link
Member

tpn commented Oct 13, 2012

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.

@tpn tpn closed this as completed Oct 13, 2012
@ezio-melotti ezio-melotti transferred this issue from another repository Apr 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
build The build process and cross-build type-bug An unexpected behavior, bug, or error
Projects
None yet
Development

No branches or pull requests

4 participants