Python test scripts not using libtool archives
Part of #525 (closed) is down to the fact that pybin_scripts
get 'compiled' into the same directory into libtool shell scripts that look like this:
#!/bin/sh
PYTHONPATH="/Users/duncan/git/lalsuite/lalinspiral/bin:/Users/duncan/git/lalsuite/lalinspiral/bin:/Users/duncan/git/lalsuite/lalburst/python:/Users/duncan/git/lalsuite/lalframe/python:/Users/duncan/git/lalsuite/lalsimulation/python:/Users/duncan/git/lalsuite/lalmetaio/python:/Users/duncan/git/lalsuite/lal/python:${PYTHONPATH}"
export PYTHONPATH
test -d '/Users/duncan/git/lalsuite/lalinspiral/bin/.libs' || mkdir '/Users/duncan/git/lalsuite/lalinspiral/bin/.libs' >/dev/null 2>&1
echo '##(in place of shebang, for consistent line numbers)' > '/Users/duncan/git/lalsuite/lalinspiral/bin/.libs/lalinspiral_thinca.py'
/usr/bin/sed -e 's|@LALSUITE_BINDIR@|/Users/duncan/git/lalsuite/lalinspiral/bin|g' '/Users/duncan/git/lalsuite/lalinspiral/bin/lalinspiral_thinca.py' >> '/Users/duncan/git/lalsuite/lalinspiral/bin/.libs/lalinspiral_thinca.py' || exit 1
exec /Users/duncan/git/lalsuite/lalinspiral/gnuscripts/lalsuite_run_uninstalled '/Users/duncan/git/lalsuite/lalinspiral' '/Users/duncan/git/lalsuite/lalinspiral/bin' '../lib/liblalinspiral.la' /Users/duncan/opt/mambaforge/envs/lalsuite-dev/bin/python '/Users/duncan/git/lalsuite/lalinspiral/bin/.libs/lalinspiral_thinca.py' "$@"
exit 1
This is good. However test scripts in */test/python/
do not receive this treatment, so when they are executed, they don't know how to find the libtool libraries from the upstream lalsuite packages, so we end up with errors like this:
ImportError: dlopen(/Users/gitlab/builds/mBDmh7i9/0/lscsoft/lalsuite/lalsuite-7.5.1/_build/sub/lal/python/lal/_lal.so, 2): Library not loaded: /Users/gitlab/builds/mBDmh7i9/0/lscsoft/lalsuite/lalsuite-7.5.1/_inst/lib/liblal.20.dylib
Referenced from: /Users/gitlab/builds/mBDmh7i9/0/lscsoft/lalsuite/lalsuite-7.5.1/_build/sub/lal/python/lal/_lal.so
Reason: image not found
@karl-wette (@adam-mercer), can you suggest whether there is a way to construct a Python equivalent to test_helpers
that 'compiles' python scripts with libtool shell wrappers?