Commit 1de611c4 authored by Rohan Budhiraja's avatar Rohan Budhiraja
Browse files

[bindings][python] change python module name to parametric_curves

parent 20b20049
......@@ -31,7 +31,7 @@ ADD_REQUIRED_DEPENDENCY("eigen3 >= 3.0.5")
SET(BOOST_REQUIERED_COMPONENTS serialization)
SET(BOOST_OPTIONAL_COMPONENTS "")
OPTION (BUILD_PYTHON_INTERFACE "Build the python binding" OFF)
OPTION (BUILD_PYTHON_INTERFACE "Build the python binding" ON)
IF(BUILD_PYTHON_INTERFACE)
SET(BOOST_OPTIONAL_COMPONENTS ${BOOST_OPTIONAL_COMPONENTS} python)
FINDPYTHON(2.7 REQUIRED)
......@@ -44,39 +44,40 @@ SEARCH_FOR_EIGEN()
INCLUDE_DIRECTORIES(${Boost_INCLUDE_DIRS})
install(FILES
# ${CMAKE_SOURCE_DIR}/include/parametric-curves/bernstein.h
${CMAKE_SOURCE_DIR}/include/parametric-curves/abstract-curve.hpp
${CMAKE_SOURCE_DIR}/include/parametric-curves/MathDefs.h
${CMAKE_SOURCE_DIR}/include/parametric-curves/spline.hpp
${CMAKE_SOURCE_DIR}/include/parametric-curves/polynomial.hpp
${CMAKE_SOURCE_DIR}/include/parametric-curves/infinite-sinusoid.hpp
${CMAKE_SOURCE_DIR}/include/parametric-curves/infinite-const-acc.hpp
${CMAKE_SOURCE_DIR}/include/parametric-curves/constant.hpp
${CMAKE_SOURCE_DIR}/include/parametric-curves/linear-chirp.hpp
${CMAKE_SOURCE_DIR}/include/parametric-curves/minimum-jerk.hpp
${CMAKE_SOURCE_DIR}/include/parametric-curves/text-file.hpp
# ${CMAKE_SOURCE_DIR}/include/parametric-curves/bezier_curve.h
${CMAKE_SOURCE_DIR}/include/parametric-curves/curve-constraint.hpp
DESTINATION ${CMAKE_INSTALL_PREFIX}/include/parametric-curves
)
# ${CMAKE_SOURCE_DIR}/include/parametric-curves/bernstein.h
${CMAKE_SOURCE_DIR}/include/parametric-curves/abstract-curve.hpp
${CMAKE_SOURCE_DIR}/include/parametric-curves/MathDefs.h
${CMAKE_SOURCE_DIR}/include/parametric-curves/spline.hpp
${CMAKE_SOURCE_DIR}/include/parametric-curves/polynomial.hpp
${CMAKE_SOURCE_DIR}/include/parametric-curves/infinite-sinusoid.hpp
${CMAKE_SOURCE_DIR}/include/parametric-curves/infinite-const-acc.hpp
${CMAKE_SOURCE_DIR}/include/parametric-curves/constant.hpp
${CMAKE_SOURCE_DIR}/include/parametric-curves/linear-chirp.hpp
${CMAKE_SOURCE_DIR}/include/parametric-curves/minimum-jerk.hpp
${CMAKE_SOURCE_DIR}/include/parametric-curves/text-file.hpp
# ${CMAKE_SOURCE_DIR}/include/parametric-curves/bezier_curve.h
${CMAKE_SOURCE_DIR}/include/parametric-curves/curve-constraint.hpp
DESTINATION ${CMAKE_INSTALL_PREFIX}/include/parametric-curves
)
install(FILES
${CMAKE_SOURCE_DIR}/include/parametric-curves/serialization/eigen-matrix.hpp
#${CMAKE_SOURCE_DIR}/include/parametric-curves/serialization/archive.hpp
DESTINATION ${CMAKE_INSTALL_PREFIX}/include/parametric-curves/serialization
)
${CMAKE_SOURCE_DIR}/include/parametric-curves/serialization/eigen-matrix.hpp
#${CMAKE_SOURCE_DIR}/include/parametric-curves/serialization/archive.hpp
DESTINATION ${CMAKE_INSTALL_PREFIX}/include/parametric-curves/serialization
)
install(FILES
${CMAKE_SOURCE_DIR}/include/parametric-curves/spatial/force-curve.hpp
DESTINATION ${CMAKE_INSTALL_PREFIX}/include/parametric-curves/spatial
)
${CMAKE_SOURCE_DIR}/include/parametric-curves/spatial/force-curve.hpp
DESTINATION ${CMAKE_INSTALL_PREFIX}/include/parametric-curves/spatial
)
install(FILES
${CMAKE_SOURCE_DIR}/include/parametric-curves/utils/file-io.hpp
#${CMAKE_SOURCE_DIR}/include/parametric-curves/serialization/archive.hpp
DESTINATION ${CMAKE_INSTALL_PREFIX}/include/parametric-curves/utils
)
${CMAKE_SOURCE_DIR}/include/parametric-curves/utils/file-io.hpp
#${CMAKE_SOURCE_DIR}/include/parametric-curves/serialization/archive.hpp
DESTINATION ${CMAKE_INSTALL_PREFIX}/include/parametric-curves/utils
)
IF(BUILD_PYTHON_INTERFACE)
SET(PYWRAP ${PROJECT_NAME}_pywrap)
STRING(REGEX REPLACE "-" "_" PY_NAME ${PROJECT_NAME})
SET(PYWRAP ${PY_NAME}_pywrap)
ADD_SUBDIRECTORY(python)
ENDIF(BUILD_PYTHON_INTERFACE)
......
......@@ -5,7 +5,7 @@ FOREACH(dep ${PKG_CONFIG_PYWRAP_REQUIRES})
ADD_COMPILE_DEPENDENCY(${dep})
ENDFOREACH(dep ${PKG_CONFIG_PYWRAP_REQUIRES})
SET(${PYWRAP}_INSTALL_DIR ${CMAKE_INSTALL_PREFIX}/${PYTHON_SITELIB}/${PROJECT_NAME})
SET(${PYWRAP}_INSTALL_DIR ${CMAKE_INSTALL_PREFIX}/${PYTHON_SITELIB}/${PY_NAME})
SET(${PYWRAP}_HEADERS ""
)
......@@ -55,8 +55,8 @@ FOREACH(python ${PYTHON_FILES})
ADDITIONAL_MAKE_CLEAN_FILES
"${${PROJECT_NAME}_BINARY_DIR}/bindings/python/${PROJECT_NAME}/${pythonFile}c")
# INSTALL(FILES
# "${${PROJECT_NAME}_SOURCE_DIR}/python/${python}"
# "${CMAKE_BINARY_DIR}/bindings/python/${PROJECT_NAME}/${pythonFile}c"
# DESTINATION ${${PYWRAP}_INSTALL_DIR})
INSTALL(FILES
"${${PROJECT_NAME}_SOURCE_DIR}/python/${python}"
"${CMAKE_BINARY_DIR}/bindings/python/${PROJECT_NAME}/${pythonFile}c"
DESTINATION ${${PYWRAP}_INSTALL_DIR})
ENDFOREACH(python)
from libparametriccurves_pywrap import *
from libparametric_curves_pywrap import *
......@@ -243,7 +243,7 @@ void set_end_acc(curve_constraints_t& c, const point_t& val)
}
BOOST_PYTHON_MODULE(libparametriccurves_pywrap)
BOOST_PYTHON_MODULE(libparametric_curves_pywrap)
{
/** BEGIN eigenpy init**/
eigenpy::enableEigenPy();
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment