diff --git a/cmake/GtsamCythonWrap.cmake b/cmake/GtsamCythonWrap.cmake index eb0a6774b..b429f02d9 100644 --- a/cmake/GtsamCythonWrap.cmake +++ b/cmake/GtsamCythonWrap.cmake @@ -1,7 +1,7 @@ # Set up cache options set(GTSAM_CYTHON_INSTALL_PATH "" CACHE PATH "Cython toolbox destination, blank defaults to CMAKE_INSTALL_PREFIX/gtsam_cython") if(NOT GTSAM_CYTHON_INSTALL_PATH) - set(GTSAM_CYTHON_INSTALL_PATH "${CMAKE_INSTALL_PREFIX}/gtsam_cython") + set(GTSAM_CYTHON_INSTALL_PATH "${CMAKE_INSTALL_PREFIX}/cython") endif() # User-friendly Cython wrapping and installing function. @@ -70,7 +70,6 @@ function(install_cython_wrapped_library interface_header generated_files_path in # NOTE: only installs .pxd and .pyx and binary files (not .cpp) - the trailing slash on the directory name # here prevents creating the top-level module name directory in the destination. message(STATUS "Installing Cython Toolbox to ${install_path}") #${GTSAM_CYTHON_INSTALL_PATH}") - message(generated_files_path: "${generated_files_path}") if(GTSAM_BUILD_TYPE_POSTFIXES) foreach(build_type ${CMAKE_CONFIGURATION_TYPES}) string(TOUPPER "${build_type}" build_type_upper) diff --git a/cython/CMakeLists.txt b/cython/CMakeLists.txt index 49623f2b9..fe2f04ec7 100644 --- a/cython/CMakeLists.txt +++ b/cython/CMakeLists.txt @@ -1,4 +1,4 @@ # Install cython components include(GtsamCythonWrap) # install scripts and tests -install_cython_scripts("${CMAKE_SOURCE_DIR}/cython/" "*.py") +install_cython_scripts("${CMAKE_SOURCE_DIR}/cython/gtsam" "*.py") diff --git a/cython/tests/__init__.py b/cython/gtsam/tests/__init__.py similarity index 100% rename from cython/tests/__init__.py rename to cython/gtsam/tests/__init__.py diff --git a/cython/tests/experiments.py b/cython/gtsam/tests/experiments.py similarity index 98% rename from cython/tests/experiments.py rename to cython/gtsam/tests/experiments.py index 83f6b8c76..1437aed7b 100644 --- a/cython/tests/experiments.py +++ b/cython/gtsam/tests/experiments.py @@ -5,7 +5,7 @@ won't be discovered. """ from gtsam.gtsam import * import numpy as np -from gtsam_utils import Vector, Matrix +from gtsam.utils import Vector, Matrix r = Rot3() print(r) diff --git a/cython/tests/test_Cal3Unified.py b/cython/gtsam/tests/test_Cal3Unified.py similarity index 100% rename from cython/tests/test_Cal3Unified.py rename to cython/gtsam/tests/test_Cal3Unified.py diff --git a/cython/tests/test_JacobianFactor.py b/cython/gtsam/tests/test_JacobianFactor.py similarity index 98% rename from cython/tests/test_JacobianFactor.py rename to cython/gtsam/tests/test_JacobianFactor.py index 4abc35bfd..7e6b0faaa 100644 --- a/cython/tests/test_JacobianFactor.py +++ b/cython/gtsam/tests/test_JacobianFactor.py @@ -2,7 +2,7 @@ import unittest from gtsam import * from math import * import numpy as np -from gtsam_utils import Matrix, Vector +from gtsam.utils import Matrix, Vector class TestJacobianFactor(unittest.TestCase): diff --git a/cython/tests/test_KalmanFilter.py b/cython/gtsam/tests/test_KalmanFilter.py similarity index 100% rename from cython/tests/test_KalmanFilter.py rename to cython/gtsam/tests/test_KalmanFilter.py diff --git a/cython/tests/test_LocalizationExample.py b/cython/gtsam/tests/test_LocalizationExample.py similarity index 98% rename from cython/tests/test_LocalizationExample.py rename to cython/gtsam/tests/test_LocalizationExample.py index 2431a064a..cc7792df2 100644 --- a/cython/tests/test_LocalizationExample.py +++ b/cython/gtsam/tests/test_LocalizationExample.py @@ -1,6 +1,6 @@ import unittest from gtsam import * -from gtsam_utils import * +from gtsam.utils import * from math import * import numpy as np diff --git a/cython/tests/test_OdometryExample.py b/cython/gtsam/tests/test_OdometryExample.py similarity index 100% rename from cython/tests/test_OdometryExample.py rename to cython/gtsam/tests/test_OdometryExample.py diff --git a/cython/tests/test_PlanarSLAMExample.py b/cython/gtsam/tests/test_PlanarSLAMExample.py similarity index 100% rename from cython/tests/test_PlanarSLAMExample.py rename to cython/gtsam/tests/test_PlanarSLAMExample.py diff --git a/cython/tests/test_Pose2SLAMExample.py b/cython/gtsam/tests/test_Pose2SLAMExample.py similarity index 100% rename from cython/tests/test_Pose2SLAMExample.py rename to cython/gtsam/tests/test_Pose2SLAMExample.py diff --git a/cython/tests/test_Pose3SLAMExample.py b/cython/gtsam/tests/test_Pose3SLAMExample.py similarity index 97% rename from cython/tests/test_Pose3SLAMExample.py rename to cython/gtsam/tests/test_Pose3SLAMExample.py index f6cb2ff51..81644f61c 100644 --- a/cython/tests/test_Pose3SLAMExample.py +++ b/cython/gtsam/tests/test_Pose3SLAMExample.py @@ -2,7 +2,7 @@ import unittest from gtsam import * from math import * import numpy as np -from gtsam_utils.circlePose3 import * +from gtsam.utils.circlePose3 import * class TestPose3SLAMExample(unittest.TestCase): diff --git a/cython/tests/test_PriorFactor.py b/cython/gtsam/tests/test_PriorFactor.py similarity index 100% rename from cython/tests/test_PriorFactor.py rename to cython/gtsam/tests/test_PriorFactor.py diff --git a/cython/tests/test_SFMExample.py b/cython/gtsam/tests/test_SFMExample.py similarity index 96% rename from cython/tests/test_SFMExample.py rename to cython/gtsam/tests/test_SFMExample.py index f67b65433..2df72382a 100644 --- a/cython/tests/test_SFMExample.py +++ b/cython/gtsam/tests/test_SFMExample.py @@ -2,8 +2,8 @@ import unittest from gtsam import * from math import * import numpy as np -from gtsam_utils import Vector, Matrix -import gtsam_utils.visual_data_generator as generator +from gtsam.utils import Vector, Matrix +import gtsam.utils.visual_data_generator as generator class TestSFMExample(unittest.TestCase): diff --git a/cython/tests/test_StereoVOExample.py b/cython/gtsam/tests/test_StereoVOExample.py similarity index 98% rename from cython/tests/test_StereoVOExample.py rename to cython/gtsam/tests/test_StereoVOExample.py index 964ac43a0..65ca7f3b7 100644 --- a/cython/tests/test_StereoVOExample.py +++ b/cython/gtsam/tests/test_StereoVOExample.py @@ -2,7 +2,7 @@ import unittest from gtsam import * from math import * import numpy as np -from gtsam_utils import Vector, Matrix +from gtsam.utils import Vector, Matrix class TestStereoVOExample(unittest.TestCase): diff --git a/cython/tests/test_Values.py b/cython/gtsam/tests/test_Values.py similarity index 100% rename from cython/tests/test_Values.py rename to cython/gtsam/tests/test_Values.py diff --git a/cython/tests/test_VisualISAMExample.py b/cython/gtsam/tests/test_VisualISAMExample.py similarity index 90% rename from cython/tests/test_VisualISAMExample.py rename to cython/gtsam/tests/test_VisualISAMExample.py index 5e7133d74..c2c4a98ac 100644 --- a/cython/tests/test_VisualISAMExample.py +++ b/cython/gtsam/tests/test_VisualISAMExample.py @@ -2,9 +2,9 @@ import unittest from gtsam import * from math import * import numpy as np -from gtsam_utils import Vector, Matrix -import gtsam_utils.visual_data_generator as generator -import gtsam_utils.visual_isam as visual_isam +from gtsam.utils import Vector, Matrix +import gtsam.utils.visual_data_generator as generator +import gtsam.utils.visual_isam as visual_isam class TestVisualISAMExample(unittest.TestCase): diff --git a/cython/gtsam_utils/__init__.py b/cython/gtsam/utils/__init__.py similarity index 100% rename from cython/gtsam_utils/__init__.py rename to cython/gtsam/utils/__init__.py diff --git a/cython/gtsam_utils/circlePose3.py b/cython/gtsam/utils/circlePose3.py similarity index 100% rename from cython/gtsam_utils/circlePose3.py rename to cython/gtsam/utils/circlePose3.py diff --git a/cython/gtsam_utils/np_utils.py b/cython/gtsam/utils/np_utils.py similarity index 100% rename from cython/gtsam_utils/np_utils.py rename to cython/gtsam/utils/np_utils.py diff --git a/cython/gtsam_utils/visual_data_generator.py b/cython/gtsam/utils/visual_data_generator.py similarity index 100% rename from cython/gtsam_utils/visual_data_generator.py rename to cython/gtsam/utils/visual_data_generator.py diff --git a/cython/gtsam_utils/visual_isam.py b/cython/gtsam/utils/visual_isam.py similarity index 100% rename from cython/gtsam_utils/visual_isam.py rename to cython/gtsam/utils/visual_isam.py