From e92a1b3723e7ddfa72d1fa40c6b3a79b7e1e19f7 Mon Sep 17 00:00:00 2001 From: John Ralls Date: Tue, 28 Nov 2017 14:25:24 -0800 Subject: [PATCH] Fix python tests in tarball builds. --- bindings/python/Makefile.am | 17 ++++++++++++----- bindings/python/tests/CMakeLists.txt | 1 + common/test-core/CMakeLists.txt | 1 + 3 files changed, 14 insertions(+), 5 deletions(-) diff --git a/bindings/python/Makefile.am b/bindings/python/Makefile.am index 264c2cf502..06e8e81d6b 100644 --- a/bindings/python/Makefile.am +++ b/bindings/python/Makefile.am @@ -106,18 +106,25 @@ sqlite3test_SOURCES = sqlite3test.c sqlite3test_LDADD = ${_gnucash_core_c_la_LIBADD} sqlite3test_CPPFLAGS = ${_gnucash_core_c_la_CPPFLAGS} -PYTHON_LINK_FILES = \ +PYTHON_GNUCASH_LINK_FILES = \ $(pkgpyexec_DATA) -.py-links:$(PYTHON_LINK_FILES) + +if BUILDING_FROM_VCS + PYTHON_LINK_FILES = $(filter-out gnucash_core_c.py,${PYTHON_GNUCASH_LINK_FILES}) +else + PYTHON_LINK_FILES = ${PYTHON_GNUCASH_LINK_FILES} +endif + +.py-links:$(PYTHON_GNUCASH_LINK_FILES) $(RM) -rf gnucash mkdir -p gnucash if GNUCASH_SEPARATE_BUILDDIR - for X in $(filter-out gnucash_core_c.py,${PYTHON_LINK_FILES}) ; do \ - $(LN_S) -f ${srcdir}/$$X . ; \ + for X in ${PYTHON_LINK_FILES} ; do \ + $(LN_S) -f ${srcdir}/$$X . ; \ done endif - ( cd gnucash; for file in $(PYTHON_LINK_FILES) ; do \ + ( cd gnucash; for file in $(PYTHON_GNUCASH_LINK_FILES) ; do \ $(LN_S) -f ../$$file .; \ done ) diff --git a/bindings/python/tests/CMakeLists.txt b/bindings/python/tests/CMakeLists.txt index d0a857af51..ef38aa1281 100644 --- a/bindings/python/tests/CMakeLists.txt +++ b/bindings/python/tests/CMakeLists.txt @@ -12,6 +12,7 @@ SET(test_python_bindings_DATA test_account.py test_book.py test_business.py + test_commodity.py test_split.py test_transaction.py) diff --git a/common/test-core/CMakeLists.txt b/common/test-core/CMakeLists.txt index 9d2e335059..aa6e331ff8 100644 --- a/common/test-core/CMakeLists.txt +++ b/common/test-core/CMakeLists.txt @@ -36,6 +36,7 @@ IF (BUILDING_FROM_VCS) ELSE() SET (SWIG_UNITTEST_SUPPORT_GUILE_C swig-unittest-support-guile.c) SET (SWIG_UNITTEST_SUPPORT_PYTHON_C swig-unittest-support-python.c) + FILE(COPY unittest_support.py DESTINATION ${CMAKE_CURRENT_BINARY_DIR}) ENDIF()