Issue 14774: _sysconfigdata.py doesn't support multiple build configurations
Created on 2012-05-10 19:47 by dmalcolm, last changed 2022-04-11 14:57 by admin. This issue is now closed.
| Messages (5) | |||
|---|---|---|---|
| msg160366 - (view) | Author: Dave Malcolm (dmalcolm) ![]() |
Date: 2012-05-10 19:47 | |
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?
|
|||
| msg160367 - (view) | Author: Dave Malcolm (dmalcolm) ![]() |
Date: 2012-05-10 19:55 | |
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 |
|||
| msg160385 - (view) | Author: Éric Araujo (eric.araujo) * ![]() |
Date: 2012-05-10 23:44 | |
Would always recreating _sysconfigdata.py solve the problem? |
|||
| msg160401 - (view) | Author: Antoine Pitrou (pitrou) * ![]() |
Date: 2012-05-11 05:04 | |
> 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). |
|||
| msg172814 - (view) | Author: Trent Nelson (trent) * ![]() |
Date: 2012-10-13 17:22 | |
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. |
|||
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2022-04-11 14:57:30 | admin | set | github: 58979 |
| 2012-10-13 17:22:05 | trent | set | status: open -> closed nosy:
+ trent resolution: duplicate |
| 2012-09-04 07:46:44 | Arfrever | set | nosy:
+ Arfrever |
| 2012-05-11 05:04:45 | pitrou | set | messages: + msg160401 |
| 2012-05-10 23:44:17 | eric.araujo | set | messages: + msg160385 |
| 2012-05-10 23:43:38 | eric.araujo | set | nosy:
+ pitrou, eric.araujo |
| 2012-05-10 19:55:24 | dmalcolm | set | messages: + msg160367 |
| 2012-05-10 19:47:33 | dmalcolm | create | |
