Simon Wells added the comment:
oh the rabbit hole...
as i have other builds of python3.7 on my system i wanted to ensure it used the
correct python and python-config (python 3.7 was built and installed into
$HOME/Projects/python/inst/) as such its a rather convoluted configure command
Simon Wells added the comment:
ah ok, sorry i wasn't clear at first, the issue isn't when building python its
when building a library which depends on python in this case libxml2, which
when given the --enable-python stuff uses
"PYTHON_LIBS=`python$PYTHON_VERSION-config --ld
Simon Wells added the comment:
with a fresh 3.7.0 download
./configure --prefix=... --enable-shared
make -j5
make install
path/to/python3-config --ldflags
-lpython3.7m -ldl -framework CoreFoundation -Wl,-stack_size,100 -framework
CoreFoundation
New submission from Simon Wells :
if you didn't build python as a framework it adds
sysconfig.get_config_vars('LINKFORSHARED') when you run 'python-config
--ldflags' this resolves to
>>> sysconfig.get_config_var('LINKFORSHARED')
'-Wl,-stack_size,100 -framework CoreFoundation
/