From c0e4e9d8076fa9fe2eeccc12371e4775ec51033a Mon Sep 17 00:00:00 2001 From: Matt Whitlock Date: Sun, 3 Aug 2025 17:36:35 -0400 Subject: [PATCH 1/2] ax_python_devel.m4: update to version 37 from Autoconf Archive --- tools/build-aux/m4/ax_python_devel.m4 | 376 +++++++++++++++++--------- 1 file changed, 252 insertions(+), 124 deletions(-) diff --git a/tools/build-aux/m4/ax_python_devel.m4 b/tools/build-aux/m4/ax_python_devel.m4 index 8269c547e..935056cc4 100644 --- a/tools/build-aux/m4/ax_python_devel.m4 +++ b/tools/build-aux/m4/ax_python_devel.m4 @@ -4,7 +4,7 @@ # # SYNOPSIS # -# AX_PYTHON_DEVEL([version]) +# AX_PYTHON_DEVEL([version[,optional]]) # # DESCRIPTION # @@ -23,6 +23,11 @@ # version number. Don't use "PYTHON_VERSION" for this: that environment # variable is declared as precious and thus reserved for the end-user. # +# By default this will fail if it does not detect a development version of +# python. If you want it to continue, set optional to true, like +# AX_PYTHON_DEVEL([], [true]). The ax_python_devel_found variable will be +# "no" if it fails. +# # This macro should work for all versions of Python >= 2.1.0. As an end # user, you can disable the check for the python version by setting the # PYTHON_NOVERSIONCHECK environment variable to something else than the @@ -67,10 +72,18 @@ # modified version of the Autoconf Macro, you may extend this special # exception to the GPL to apply to your modified version as well. -#serial 21 +#serial 37 AU_ALIAS([AC_PYTHON_DEVEL], [AX_PYTHON_DEVEL]) AC_DEFUN([AX_PYTHON_DEVEL],[ + # Get whether it's optional + if test -z "$2"; then + ax_python_devel_optional=false + else + ax_python_devel_optional=$2 + fi + ax_python_devel_found=yes + # # Allow the use of a (user set) custom python version # @@ -81,21 +94,26 @@ AC_DEFUN([AX_PYTHON_DEVEL],[ AC_PATH_PROG([PYTHON],[python[$PYTHON_VERSION]]) if test -z "$PYTHON"; then - AC_MSG_ERROR([Cannot find python$PYTHON_VERSION in your system path]) + AC_MSG_WARN([Cannot find python$PYTHON_VERSION in your system path]) + if ! $ax_python_devel_optional; then + AC_MSG_ERROR([Giving up, python development not available]) + fi + ax_python_devel_found=no PYTHON_VERSION="" fi - # - # Check for a version of Python >= 2.1.0 - # - AC_MSG_CHECKING([for a version of Python >= '2.1.0']) - ac_supports_python_ver=`$PYTHON -c "import sys; \ + if test $ax_python_devel_found = yes; then + # + # Check for a version of Python >= 2.1.0 + # + AC_MSG_CHECKING([for a version of Python >= '2.1.0']) + ac_supports_python_ver=`$PYTHON -c "import sys; \ ver = sys.version.split ()[[0]]; \ print (ver >= '2.1.0')"` - if test "$ac_supports_python_ver" != "True"; then + if test "$ac_supports_python_ver" != "True"; then if test -z "$PYTHON_NOVERSIONCHECK"; then AC_MSG_RESULT([no]) - AC_MSG_FAILURE([ + AC_MSG_WARN([ This version of the AC@&t@_PYTHON_DEVEL macro doesn't work properly with versions of Python before 2.1.0. You may need to re-run configure, setting the @@ -104,58 +122,119 @@ PYTHON_EXTRA_LIBS and PYTHON_EXTRA_LDFLAGS by hand. Moreover, to disable this check, set PYTHON_NOVERSIONCHECK to something else than an empty string. ]) + if ! $ax_python_devel_optional; then + AC_MSG_FAILURE([Giving up]) + fi + ax_python_devel_found=no + PYTHON_VERSION="" else AC_MSG_RESULT([skip at user request]) fi - else + else AC_MSG_RESULT([yes]) + fi fi - # - # if the macro parameter ``version'' is set, honour it - # - if test -n "$1"; then + if test $ax_python_devel_found = yes; then + # + # If the macro parameter ``version'' is set, honour it. + # A Python shim class, VPy, is used to implement correct version comparisons via + # string expressions, since e.g. a naive textual ">= 2.7.3" won't work for + # Python 2.7.10 (the ".1" being evaluated as less than ".3"). + # + if test -n "$1"; then AC_MSG_CHECKING([for a version of Python $1]) - ac_supports_python_ver=`$PYTHON -c "import sys; \ - ver = sys.version.split ()[[0]]; \ + cat << EOF > ax_python_devel_vpy.py +class VPy: + def vtup(self, s): + return tuple(map(int, s.strip().replace("rc", ".").split("."))) + def __init__(self): + import sys + self.vpy = tuple(sys.version_info)[[:3]] + def __eq__(self, s): + return self.vpy == self.vtup(s) + def __ne__(self, s): + return self.vpy != self.vtup(s) + def __lt__(self, s): + return self.vpy < self.vtup(s) + def __gt__(self, s): + return self.vpy > self.vtup(s) + def __le__(self, s): + return self.vpy <= self.vtup(s) + def __ge__(self, s): + return self.vpy >= self.vtup(s) +EOF + ac_supports_python_ver=`$PYTHON -c "import ax_python_devel_vpy; \ + ver = ax_python_devel_vpy.VPy(); \ print (ver $1)"` + rm -rf ax_python_devel_vpy*.py* __pycache__/ax_python_devel_vpy*.py* if test "$ac_supports_python_ver" = "True"; then - AC_MSG_RESULT([yes]) + AC_MSG_RESULT([yes]) else AC_MSG_RESULT([no]) - AC_MSG_ERROR([this package requires Python $1. + AC_MSG_WARN([this package requires Python $1. If you have it installed, but it isn't the default Python interpreter in your system path, please pass the PYTHON_VERSION variable to configure. See ``configure --help'' for reference. ]) + if ! $ax_python_devel_optional; then + AC_MSG_ERROR([Giving up]) + fi + ax_python_devel_found=no PYTHON_VERSION="" fi + fi fi - # - # Check if you have distutils, else fail - # - AC_MSG_CHECKING([for the distutils Python package]) - ac_distutils_result=`$PYTHON -c "import distutils" 2>&1` - if test $? -eq 0; then + if test $ax_python_devel_found = yes; then + # + # Check if you have distutils, else fail + # + AC_MSG_CHECKING([for the sysconfig Python package]) + ac_sysconfig_result=`$PYTHON -c "import sysconfig" 2>&1` + if test $? -eq 0; then AC_MSG_RESULT([yes]) - else + IMPORT_SYSCONFIG="import sysconfig" + else AC_MSG_RESULT([no]) - AC_MSG_ERROR([cannot import Python module "distutils". + + AC_MSG_CHECKING([for the distutils Python package]) + ac_sysconfig_result=`$PYTHON -c "from distutils import sysconfig" 2>&1` + if test $? -eq 0; then + AC_MSG_RESULT([yes]) + IMPORT_SYSCONFIG="from distutils import sysconfig" + else + AC_MSG_WARN([cannot import Python module "distutils". Please check your Python installation. The error was: -$ac_distutils_result]) - PYTHON_VERSION="" +$ac_sysconfig_result]) + if ! $ax_python_devel_optional; then + AC_MSG_ERROR([Giving up]) + fi + ax_python_devel_found=no + PYTHON_VERSION="" + fi + fi fi - # - # Check for Python include path - # - AC_MSG_CHECKING([for Python include path]) - if test -z "$PYTHON_CPPFLAGS"; then - python_path=`$PYTHON -c "import distutils.sysconfig; \ - print (distutils.sysconfig.get_python_inc ());"` - plat_python_path=`$PYTHON -c "import distutils.sysconfig; \ - print (distutils.sysconfig.get_python_inc (plat_specific=1));"` + if test $ax_python_devel_found = yes; then + # + # Check for Python include path + # + AC_MSG_CHECKING([for Python include path]) + if test -z "$PYTHON_CPPFLAGS"; then + if test "$IMPORT_SYSCONFIG" = "import sysconfig"; then + # sysconfig module has different functions + python_path=`$PYTHON -c "$IMPORT_SYSCONFIG; \ + print (sysconfig.get_path ('include'));"` + plat_python_path=`$PYTHON -c "$IMPORT_SYSCONFIG; \ + print (sysconfig.get_path ('platinclude'));"` + else + # old distutils way + python_path=`$PYTHON -c "$IMPORT_SYSCONFIG; \ + print (sysconfig.get_python_inc ());"` + plat_python_path=`$PYTHON -c "$IMPORT_SYSCONFIG; \ + print (sysconfig.get_python_inc (plat_specific=1));"` + fi if test -n "${python_path}"; then if test "${plat_python_path}" != "${python_path}"; then python_path="-I$python_path -I$plat_python_path" @@ -164,21 +243,22 @@ $ac_distutils_result]) fi fi PYTHON_CPPFLAGS=$python_path - fi - AC_MSG_RESULT([$PYTHON_CPPFLAGS]) + fi + AC_MSG_RESULT([$PYTHON_CPPFLAGS]) + AC_SUBST([PYTHON_CPPFLAGS]) - # - # Check for Python library path - # - AC_MSG_CHECKING([for Python library path]) - if test -z "$PYTHON_LIBS"; then + # + # Check for Python library path + # + AC_MSG_CHECKING([for Python library path]) + if test -z "$PYTHON_LIBS"; then # (makes two attempts to ensure we've got a version number # from the interpreter) ac_python_version=`cat</dev/null; then - # On OSX we can hit https://bugs.python.org/issue3588 - PYTHON_EXTRA_LIBS=`$PYTHON-config --ldflags` - fi - fi - AC_MSG_RESULT([$PYTHON_EXTRA_LDFLAGS]) + # Hack for macos, it sticks this in here. + PYTHON_EXTRA_LDFLAGS=`echo $PYTHON_EXTRA_LDFLAGS | sed 's/CoreFoundation.*$/CoreFoundation/'` + fi + AC_MSG_RESULT([$PYTHON_EXTRA_LDFLAGS]) + AC_SUBST(PYTHON_EXTRA_LDFLAGS) - # - # final check to see if everything compiles alright - # - AC_MSG_CHECKING([consistency of all components of python development environment]) - # save current global flags - ac_save_LIBS="$LIBS" - ac_save_LDFLAGS="$LDFLAGS" - ac_save_CPPFLAGS="$CPPFLAGS" - LIBS="$ac_save_LIBS $PYTHON_LIBS $PYTHON_EXTRA_LIBS $PYTHON_EXTRA_LIBS" - LDFLAGS="$ac_save_LDFLAGS $PYTHON_EXTRA_LDFLAGS" - CPPFLAGS="$ac_save_CPPFLAGS $PYTHON_CPPFLAGS" - AC_LANG_PUSH([C]) - AC_LINK_IFELSE([ + # + # final check to see if everything compiles alright + # + AC_MSG_CHECKING([consistency of all components of python development environment]) + # save current global flags + ac_save_LIBS="$LIBS" + ac_save_LDFLAGS="$LDFLAGS" + ac_save_CPPFLAGS="$CPPFLAGS" + LIBS="$ac_save_LIBS $PYTHON_LIBS $PYTHON_EXTRA_LIBS" + LDFLAGS="$ac_save_LDFLAGS $PYTHON_EXTRA_LDFLAGS" + CPPFLAGS="$ac_save_CPPFLAGS $PYTHON_CPPFLAGS" + AC_LANG_PUSH([C]) + AC_LINK_IFELSE([ AC_LANG_PROGRAM([[#include ]], [[Py_Initialize();]]) ],[pythonexists=yes],[pythonexists=no]) - AC_LANG_POP([C]) - # turn back to default flags - CPPFLAGS="$ac_save_CPPFLAGS" - LIBS="$ac_save_LIBS" - LDFLAGS="$ac_save_LDFLAGS" + AC_LANG_POP([C]) + # turn back to default flags + CPPFLAGS="$ac_save_CPPFLAGS" + LIBS="$ac_save_LIBS" + LDFLAGS="$ac_save_LDFLAGS" - AC_MSG_RESULT([$pythonexists]) + AC_MSG_RESULT([$pythonexists]) - if test ! "x$pythonexists" = "xyes"; then - if test "x$python_manylinux" = "xyes"; then - # Ignore linking errors for manylinux builds (no libpython.so) - pythonexists="yes" - else - AC_MSG_RESULT([ + if test ! "x$pythonexists" = "xyes"; then + AC_MSG_WARN([ Could not link test program to Python. Maybe the main Python library has been installed in some non-standard library path. If so, pass it to configure, via the LIBS environment variable. @@ -320,20 +453,15 @@ EOD` You probably have to install the development version of the Python package for your distribution. The exact name of this package varies among them. ============================================================================ - ]) - PYTHON_VERSION="" - PYTHON_CPPFLAGS="" - PYTHON_LIBS="" - PYTHON_SITE_PKG="" - PYTHON_EXTRA_LDFLAGS="" - PYTHON_EXTRA_LIBS="" - fi + ]) + if ! $ax_python_devel_optional; then + AC_MSG_ERROR([Giving up]) + fi + ax_python_devel_found=no + PYTHON_VERSION="" + fi fi - AC_SUBST([PYTHON_CPPFLAGS]) - AC_SUBST([PYTHON_LIBS]) - AC_SUBST([PYTHON_SITE_PKG]) - AC_SUBST(PYTHON_EXTRA_LDFLAGS) - AC_SUBST(PYTHON_EXTRA_LIBS) + # # all done! # From 5e137d0359e43de717c313bb6ebaebdb99993c11 Mon Sep 17 00:00:00 2001 From: Matt Whitlock Date: Thu, 31 Jul 2025 17:22:27 -0400 Subject: [PATCH 2/2] don't embed Python code into libwallycore.so Embedding SWIG Python code into libwallycore.so ties the library to a specific version of Python, thereby precluding concurrent installation of the wallycore Python module for multiple implementations of Python on the same system if the Python modules are linked with a system-wide libwallycore.so. On Gentoo at least, linking libwallycore.so with libpython3.14.so and then attempting to use the wallycore Python module from Python 3.11, 3.12, or 3.13 causes an immediate segfault. Rather than injecting Python-specific glue into libwallycore.so, we can and should keep it contained within the Python native extension library that we build for each Python implementation. The Python wheel actually already compiles swig_python_wrap.c and links it into the native extension library, so linking it into libwallycore.so as well is redundant and harmful. * Remove libswig_python.la from libwallycore_la_LIBADD, and expunge its existence from Makefile.am entirely since it's now unused. * The Python wheel build for each Python implementation compiles swig_python_wrap.c against the headers for that particular Python implementation, ensuring that the resulting native extension library matches the ABI of the Python implementation for which it is installed. This may be a different Python implementation than the one found by Autoconf, the only relevance of which now is in finding the interpreter with which to run the tests. * Since we no longer link libwallycore.so with libpython*.so, there should no longer be any manylinux compatibility issues, so drop the --enable-python-manylinux Autoconf option and the PYTHON_MANYLINUX Automake conditional. This also means that the test programs no longer need to link with $(PYTHON_LIBS) since libwallycore.la now never has any dependence on Python (implicit or explicit). * Note that the Python native extension libraries do not explicitly link with libpython*.so either. This is correct, as the dynamic linker resolves their undefined Py* symbols when it loads them into the Python interpreter. * manylinux intentionally omits libpython*.so libraries from its build containers to discourage/prevent wheels' native extension libraries from linking against the Python DSO. We don't do that (anymore), but the AX_PYTHON_DEVEL Autoconf macro expects to be able to find it and fails its final sanity check if it can't. Thankfully, more recent versions of the macro support an 'optional' flag that allows configure to proceed even if the check fails. So now we set that flag and just check that we have a value in $PYTHON_CPPFLAGS, which is all the SWIG_PYTHON macro cares about in the first place. After applying these changes, the Gentoo ebuild for libwally-core 1.5.0 now successfully runs the SWIG Python tests on all currently supported versions of Python (3.11 through 3.14), all using the same libwallycore.so.6. --- README.md | 3 --- configure.ac | 15 ++++++------- setup.py | 2 +- src/Makefile.am | 58 +++++++++---------------------------------------- 4 files changed, 18 insertions(+), 60 deletions(-) diff --git a/README.md b/README.md index fde8596ec..8ae08f108 100644 --- a/README.md +++ b/README.md @@ -73,9 +73,6 @@ $ brew install swig - `--enable-swig-python`. Enable the [SWIG](http://www.swig.org/) Python interface. The resulting shared library can be imported from Python using the generated interface file `src/swig_python/wallycore/__init__.py`. (default: no). -- `--enable-python-manylinux`. Enable [manylinux](https://github.com/pypa/manylinux) - support for building [PyPI](https://pypi.org/) compatible python wheels. Using - the resulting library in non-python programs requires linking with `libpython.so`. - `--enable-swig-java`. Enable the [SWIG](http://www.swig.org/) Java (JNI) interface. After building, see `src/swig_java/src/com/blockstream/libwally/Wally.java` for the Java interface definition (default: no). diff --git a/configure.ac b/configure.ac index c57cc75a3..9af51d86d 100644 --- a/configure.ac +++ b/configure.ac @@ -311,12 +311,11 @@ AC_SUBST([libsecp256k1_LIBS]) # # Python facilities # -AC_ARG_ENABLE(python-manylinux, - AS_HELP_STRING([--enable-python-manylinux],[enable manylinux Python compatibility (default: no)]), - [python_manylinux=$enableval], [python_manylinux=no]) -AM_CONDITIONAL([PYTHON_MANYLINUX], [test "x$python_manylinux" = "xyes"]) - -AX_PYTHON_DEVEL([>= '2.7.0']) +dnl We set the 'optional' flag here because manylinux cibuildwheel containers +dnl don't include libpython*.so, and thus AX_PYTHON_DEVEL fails its final sanity +dnl check. We actually don't link against libpython*.so anyway, so all we care +dnl about is that we get a good value of $PYTHON_CPPFLAGS to pass to SWIG. +AX_PYTHON_DEVEL([>= '2.7.0'], [true]) AM_CONDITIONAL([HAVE_PYTHON], [test "$PYTHON" != ""]) @@ -338,10 +337,10 @@ AC_ARG_ENABLE(swig-python, [swig_python=$enableval], [swig_python=no]) AM_CONDITIONAL([USE_SWIG_PYTHON], [test "x$swig_python" = "xyes"]) -AM_CONDITIONAL([RUN_PYTHON_TESTS], [test "$PYTHON" != "" -a "x$pythonexists" = "xyes"]) +AM_CONDITIONAL([RUN_PYTHON_TESTS], [test -n "$PYTHON"]) if test "x$swig_python" = "xyes"; then - if test "x$pythonexists" != "xyes"; then + if test -z "$PYTHON_CPPFLAGS"; then AC_MSG_FAILURE([ERROR: No usable Python was found for swig-python]) fi if test "x$elements_abi" = "xno"; then diff --git a/setup.py b/setup.py index 98807bc84..1bcb7eb2f 100644 --- a/setup.py +++ b/setup.py @@ -62,7 +62,7 @@ def _call(args, cwd=ABS_PATH): _call(['git', 'submodule', 'update', '--init', '--recursive']) CONFIGURE_ARGS = [ - '--with-pic', '--enable-swig-python', '--enable-python-manylinux', + '--with-pic', '--enable-swig-python', '--disable-swig-java', '--disable-tests', '--disable-dependency-tracking' ] diff --git a/src/Makefile.am b/src/Makefile.am index 56154796d..b374a06cd 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -38,15 +38,7 @@ TOOLS_EXTRA_ARGS := endif if USE_SWIG_PYTHON -noinst_LTLIBRARIES += libswig_python.la -libswig_python_la_SOURCES = swig_python/swig_python_wrap.c - -libswig_python_la_CFLAGS = -I$(top_srcdir) $(libsecp256k1_CFLAGS) $(AM_CFLAGS) $(SWIG_PYTHON_CPPFLAGS) $(SWIG_WARN_CFLAGS) $(NOALIAS_CFLAGS) -if PYTHON_MANYLINUX -else -libswig_python_la_LIBADD = $(PYTHON_LIBS) -endif # PYTHON_MANYLINUX - +BUILT_SOURCES = swig_python/swig_python_wrap.c # Append our extra wrapper code to the package swig_python/swig_python_wrap.c : swig_python/swig.i swig_python/python_extra.py_in $(AM_V_at)$(SWIG) $(SWIG_PYTHON_OPT) $(SWIG_GEN_FLAGS) -outdir swig_python -o $@ $< && \ @@ -60,20 +52,6 @@ clean-local: clean-swig-python endif # USE_SWIG_PYTHON if RUN_PYTHON_TESTS -# Python requires the shared library to be named _wallycore.so -# for 'import' to work. -if IS_OSX -platform_dso_ext = dylib -else -if IS_MINGW -platform_dso_ext = dll -else -platform_dso_ext = so -endif # IS_MINGW -endif # IS_OSX -.libs/_wallycore.so: .libs/libwallycore.$(platform_dso_ext) - $(AM_V_at)ln -sfn libwallycore.$(platform_dso_ext) $@ -PYTHON_TEST_DEPS = .libs/_wallycore.so PYTHON_TEST = PYTHONDONTWRITEBYTECODE=1 $(PYTHON) endif @@ -224,31 +202,26 @@ endif TESTS = noinst_PROGRAMS = + if RUN_TESTS TESTS += test_bech32 noinst_PROGRAMS += test_bech32 test_bech32_SOURCES = ctest/test_bech32.c test_bech32_CFLAGS = -I$(top_srcdir)/include $(AM_CFLAGS) test_bech32_LDADD = $(lib_LTLIBRARIES) @CTEST_EXTRA_STATIC@ -if PYTHON_MANYLINUX -test_bech32_LDADD += $(PYTHON_LIBS) -endif + TESTS += test_psbt noinst_PROGRAMS += test_psbt test_psbt_SOURCES = ctest/test_psbt.c ccan/ccan/str/hex/hex.c test_psbt_CFLAGS = -I$(top_srcdir)/include $(AM_CFLAGS) -I$(srcdir)/ccan test_psbt_LDADD = $(lib_LTLIBRARIES) @CTEST_EXTRA_STATIC@ -if PYTHON_MANYLINUX -test_psbt_LDADD += $(PYTHON_LIBS) -endif + TESTS += test_psbt_limits noinst_PROGRAMS += test_psbt_limits test_psbt_limits_SOURCES = ctest/test_psbt_limits.c ccan/ccan/str/hex/hex.c test_psbt_limits_CFLAGS = -I$(top_srcdir)/include $(AM_CFLAGS) -I$(srcdir)/ccan test_psbt_limits_LDADD = $(lib_LTLIBRARIES) @CTEST_EXTRA_STATIC@ -if PYTHON_MANYLINUX -test_psbt_limits_LDADD += $(PYTHON_LIBS) -endif + if USE_PTHREAD TESTS += test_clear noinst_PROGRAMS += test_clear @@ -256,43 +229,32 @@ test_clear_SOURCES = ctest/test_clear.c test_clear_CFLAGS = -I$(top_srcdir)/include $(PTHREAD_CFLAGS) $(AM_CFLAGS) $(NOOPT_CFLAGS) $(NOBUILTIN_CFLAGS) test_clear_LIBS = $(PTHREAD_LIBS) test_clear_LDADD = $(lib_LTLIBRARIES) @CTEST_EXTRA_STATIC@ -if PYTHON_MANYLINUX -test_clear_LDADD += $(PYTHON_LIBS) -endif endif + TESTS += test_coinselection noinst_PROGRAMS += test_coinselection test_coinselection_SOURCES = ctest/test_coinselection.c test_coinselection_CFLAGS = -I$(top_srcdir)/include $(AM_CFLAGS) test_coinselection_LDADD = $(lib_LTLIBRARIES) @CTEST_EXTRA_STATIC@ -if PYTHON_MANYLINUX -test_coinselection_LDADD += $(PYTHON_LIBS) -endif + TESTS += test_tx noinst_PROGRAMS += test_tx test_tx_SOURCES = ctest/test_tx.c test_tx_CFLAGS = -I$(top_srcdir)/include $(AM_CFLAGS) test_tx_LDADD = $(lib_LTLIBRARIES) @CTEST_EXTRA_STATIC@ -if PYTHON_MANYLINUX -test_tx_LDADD += $(PYTHON_LIBS) -endif + TESTS += test_descriptor noinst_PROGRAMS += test_descriptor test_descriptor_SOURCES = ctest/test_descriptor.c test_descriptor_CFLAGS = -I$(top_srcdir)/include $(AM_CFLAGS) test_descriptor_LDADD = $(lib_LTLIBRARIES) @CTEST_EXTRA_STATIC@ -if PYTHON_MANYLINUX -test_descriptor_LDADD += $(PYTHON_LIBS) -endif + if BUILD_ELEMENTS TESTS += test_elements_tx noinst_PROGRAMS += test_elements_tx test_elements_tx_SOURCES = ctest/test_elements_tx.c test_elements_tx_CFLAGS = -I$(top_srcdir)/include $(AM_CFLAGS) test_elements_tx_LDADD = $(lib_LTLIBRARIES) @CTEST_EXTRA_STATIC@ -if PYTHON_MANYLINUX -test_elements_tx_LDADD += $(PYTHON_LIBS) -endif endif check-local: check-libwallycore check-swig-python check-swig-java @@ -300,7 +262,7 @@ check-local: check-libwallycore check-swig-python check-swig-java if SHARED_BUILD_ENABLED if RUN_PYTHON_TESTS -check-libwallycore: $(PYTHON_TEST_DEPS) +check-libwallycore: $(AM_V_at)$(PYTHON_TEST) test/test_address.py $(AM_V_at)$(PYTHON_TEST) test/test_aes.py $(AM_V_at)$(PYTHON_TEST) test/test_anti_exfil.py