diff --git a/python/gtsam/.gitignore b/python/gtsam/.gitignore index 8f89b0f14..580cd8494 100644 --- a/python/gtsam/.gitignore +++ b/python/gtsam/.gitignore @@ -1 +1 @@ -/libgtsam_python.so +/_libgtsam_python.so diff --git a/python/gtsam/__init__.py b/python/gtsam/__init__.py index 9ac4cc939..9a0a4536e 100644 --- a/python/gtsam/__init__.py +++ b/python/gtsam/__init__.py @@ -1,2 +1,2 @@ -from libgtsam_python import * +from _libgtsam_python import * import utils diff --git a/python/handwritten/CMakeLists.txt b/python/handwritten/CMakeLists.txt index 753e33831..93b928d94 100644 --- a/python/handwritten/CMakeLists.txt +++ b/python/handwritten/CMakeLists.txt @@ -43,6 +43,6 @@ set(PYTHON_MODULE_DIRECTORY ${CMAKE_SOURCE_DIR}/python/gtsam) # Cause the library to be output in the correct directory. add_custom_command(TARGET ${moduleName}_python POST_BUILD - COMMAND cp -v ${PYLIB_OUTPUT_FILE} ${PYTHON_MODULE_DIRECTORY}/${PYLIB_SO_NAME} + COMMAND cp -v ${PYLIB_OUTPUT_FILE} ${PYTHON_MODULE_DIRECTORY}/_${PYLIB_SO_NAME} WORKING_DIRECTORY ${PROJECT_SOURCE_DIR} COMMENT "Copying library files to python directory" ) diff --git a/python/handwritten/exportgtsam.cpp b/python/handwritten/exportgtsam.cpp index 2802a779c..e1dc646b1 100644 --- a/python/handwritten/exportgtsam.cpp +++ b/python/handwritten/exportgtsam.cpp @@ -57,7 +57,7 @@ void registerNumpyEigenConversions(); //-----------------------------------// -BOOST_PYTHON_MODULE(libgtsam_python){ +BOOST_PYTHON_MODULE(_libgtsam_python){ // Should be the first thing to be done import_array();