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