mirror of
https://github.com/Gnucash/gnucash.git
synced 2025-02-25 18:55:30 -06:00
Run the python bindings test when using CMake
This commit is contained in:
parent
f27d77746d
commit
8efe0f83e6
@ -63,6 +63,8 @@ IF(WITH_PYTHON)
|
|||||||
${PYTHON_INCLUDE_DIRS}
|
${PYTHON_INCLUDE_DIRS}
|
||||||
)
|
)
|
||||||
|
|
||||||
|
SET(PYEXEC_FILES __init__.py function_class.py gnucash_business.py gnucash_core.py)
|
||||||
|
|
||||||
ADD_LIBRARY(gnucash_core_c MODULE ${SWIG_GNUCASH_CORE_C})
|
ADD_LIBRARY(gnucash_core_c MODULE ${SWIG_GNUCASH_CORE_C})
|
||||||
TARGET_INCLUDE_DIRECTORIES(gnucash_core_c PRIVATE ${gnucash_core_c_INCLUDE_DIRS})
|
TARGET_INCLUDE_DIRECTORIES(gnucash_core_c PRIVATE ${gnucash_core_c_INCLUDE_DIRS})
|
||||||
|
|
||||||
@ -101,19 +103,19 @@ IF(WITH_PYTHON)
|
|||||||
DESTINATION ${PYTHON_SYSCONFIG_OUTPUT}/gnucash
|
DESTINATION ${PYTHON_SYSCONFIG_OUTPUT}/gnucash
|
||||||
)
|
)
|
||||||
|
|
||||||
|
FILE(COPY ${PYEXEC_FILES} DESTINATION ${CMAKE_CURRENT_BINARY_DIR}/gnucash)
|
||||||
|
|
||||||
|
ADD_CUSTOM_TARGET(gnucash-core-c-py ALL
|
||||||
|
COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_BINARY_DIR}/gnucash_core_c.py ${CMAKE_CURRENT_BINARY_DIR}/gnucash
|
||||||
|
DEPENDS ${SWIG_GNUCASH_CORE_C})
|
||||||
|
|
||||||
ENDIF()
|
ENDIF()
|
||||||
|
|
||||||
SET(python_bindings_DATA
|
SET(python_bindings_DATA ${PYEXEC_FILES}
|
||||||
__init__.py
|
|
||||||
function_class.py
|
|
||||||
gnucash_business.py
|
|
||||||
gnucash_core.i
|
gnucash_core.i
|
||||||
gnucash_core.py
|
|
||||||
sqlite3test.c
|
sqlite3test.c
|
||||||
timespec.i)
|
timespec.i)
|
||||||
|
|
||||||
SET_LOCAL_DIST(python_bindings_DIST_local CMakeLists.txt Makefile.am ${python_bindings_DATA})
|
SET_LOCAL_DIST(python_bindings_DIST_local CMakeLists.txt Makefile.am ${python_bindings_DATA})
|
||||||
|
|
||||||
SET(python_bindings_DIST ${python_bindings_DIST_local} ${test_python_bindings_DIST} ${example_scripts_DIST} PARENT_SCOPE)
|
SET(python_bindings_DIST ${python_bindings_DIST_local} ${test_python_bindings_DIST} ${example_scripts_DIST} PARENT_SCOPE)
|
||||||
|
|
||||||
|
|
@ -1,4 +1,12 @@
|
|||||||
|
|
||||||
|
IF (WITH_PYTHON)
|
||||||
|
ADD_TEST(python-bindings ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/runTests.py.in)
|
||||||
|
SET_PROPERTY(TEST python-bindings PROPERTY ENVIRONMENT
|
||||||
|
GNC_BUILDDIR=${CMAKE_BINARY_DIR}
|
||||||
|
PYTHONPATH=${CMAKE_BINARY_DIR}/src/optional/python-bindings:${CMAKE_BINARY_DIR}/lib/gnucash:${CMAKE_BINARY_DIR}/src/test-core
|
||||||
|
)
|
||||||
|
ENDIF()
|
||||||
|
|
||||||
SET(test_python_bindings_DATA
|
SET(test_python_bindings_DATA
|
||||||
runTests.py.in
|
runTests.py.in
|
||||||
test_account.py
|
test_account.py
|
||||||
|
Loading…
Reference in New Issue
Block a user