diff --git a/.gitignore b/.gitignore index fb27ed4..2ab1e8f 100644 --- a/.gitignore +++ b/.gitignore @@ -34,4 +34,6 @@ # Directories .ipynb_checkpoints/* **/build/* -example/__pycache__ \ No newline at end of file +example/__pycache__ + +**/.DS_Store diff --git a/python/CMakeLists.txt b/python/CMakeLists.txt index 31ab93e..3be6c74 100644 --- a/python/CMakeLists.txt +++ b/python/CMakeLists.txt @@ -102,7 +102,7 @@ set_target_properties( # can now access the wrapped module as an installed library. add_custom_target( python-install - COMMAND ${PYTHON_EXECUTABLE} ${PROJECT_PY_MODULE_PATH}/setup.py install + COMMAND ${PYTHON_EXECUTABLE} -m pip install --user . DEPENDS ${PROJECT_NAME}_py WORKING_DIRECTORY ${PROJECT_PY_MODULE_PATH}) diff --git a/wrapper/preamble/gtsam_example.h b/wrapper/preamble/gtsam_example.h index b62d3d8..1ce9f74 100644 --- a/wrapper/preamble/gtsam_example.h +++ b/wrapper/preamble/gtsam_example.h @@ -1,15 +1 @@ -/** - * This is a type caster for `boost::optional` so we can use optionals in Python. - * - * Example: - * In C++: void foo(boost::optional &opt); - * In Python: - * - foo(None) - * - foo(bar_instance) -*/ #include - -namespace pybind11 { namespace detail { - template - struct type_caster> : optional_caster> {}; -}} diff --git a/wrapper/pybind_wrapper.tpl.example b/wrapper/pybind_wrapper.tpl.example index be969c9..601fe25 100644 --- a/wrapper/pybind_wrapper.tpl.example +++ b/wrapper/pybind_wrapper.tpl.example @@ -1,20 +1,16 @@ -{include_boost} - #include #include #include #include -#include #include +#include +#include "gtsam/base/serialization.h" #include "gtsam/base/utilities.h" // for RedirectCout. {includes} -#include {boost_class_export} -{holder_type} - #include "gtsam_example/preamble/{module_name}.h" using namespace std; diff --git a/wrapper/specializations/gtsam_example.h b/wrapper/specializations/gtsam_example.h index 20ae89d..50ec2e2 100644 --- a/wrapper/specializations/gtsam_example.h +++ b/wrapper/specializations/gtsam_example.h @@ -11,4 +11,4 @@ // py::bind_vector >(m_, "KeyVector"); // py::bind_vector >(m_, "Point2Vector"); // py::bind_vector >(m_, "Pose3Vector"); -// py::bind_vector > > >(m_, "BetweenFactorPose3s"); \ No newline at end of file +// py::bind_vector > > >(m_, "BetweenFactorPose3s"); \ No newline at end of file