make gtsam_unstable_cython_wrapper dependent on gtsam_cython_wrapper.

release/4.3a0
Duy-Nguyen Ta 2017-03-20 17:16:17 -04:00
parent 3e4a8b6b48
commit 87443621c4
2 changed files with 8 additions and 0 deletions

View File

@ -2,6 +2,10 @@ from distutils.core import setup
from distutils.extension import Extension
from Cython.Build import cythonize
import eigency
import sys
# so that it can find the wrapped gtsam package
sys.path.append("..")
setup(
ext_modules=cythonize(Extension(

View File

@ -130,6 +130,10 @@ if (GTSAM_INSTALL_CYTHON_TOOLBOX)
"../cython/gtsam_unstable" # path to setup.py.in
"${GTSAM_CYTHON_INSTALL_PATH}/gtsam" # install path
)
add_dependencies(gtsam_unstable_cython_wrapper gtsam_cython_wrapper)
# making the cython/gtsam folder a python package, so gtsam can be found while wrapping gtsam_unstable
add_custom_target(copy_gtsam_init COMMAND ${CMAKE_COMMAND} -E copy "${CMAKE_SOURCE_DIR}/cython/gtsam/__init__.py" "${CMAKE_BINARY_DIR}/cython/gtsam")
add_dependencies(gtsam_unstable_cython_wrapper copy_gtsam_init)
endif ()
# Build examples