Skip to content
Snippets Groups Projects
Commit bf71c76b authored by Guilhem Saurel's avatar Guilhem Saurel
Browse files

use standard python bindings name

parent c8fd823c
No related branches found
Tags v4.3.0
No related merge requests found
cmake_minimum_required( VERSION 2.8 )
include_directories("${EIGEN3_INCLUDE_DIR}")
STRING(REGEX REPLACE "-" "_" PY_NAME ${PROJECT_NAME})
ADD_REQUIRED_DEPENDENCY("eigenpy")
include_directories("${PROJECT_SOURCE_DIR}/include")
FILE(GLOB_RECURSE HeaderFiles "${PROJECT_SOURCE_DIR}/include/spline/*.h")
# Define the wrapper library that wraps our library
add_library( spline SHARED spline_python.cpp )
add_library( ${PY_NAME} SHARED spline_python.cpp )
#~ target_link_libraries( centroidal_dynamics ${Boost_LIBRARIES} ${PROJECT_NAME} )
# don't prepend wrapper library name with lib
set_target_properties( spline PROPERTIES PREFIX "" )
set_target_properties( ${PY_NAME} PROPERTIES PREFIX "" )
IF(APPLE)
# We need to change the extension for python bindings
SET_TARGET_PROPERTIES(spline PROPERTIES SUFFIX ".so")
# We need to change the extension for python bindings
SET_TARGET_PROPERTIES(${PY_NAME} PROPERTIES SUFFIX ".so")
ENDIF(APPLE)
PKG_CONFIG_USE_DEPENDENCY(spline eigenpy)
PKG_CONFIG_USE_DEPENDENCY(${PY_NAME} eigenpy)
INSTALL(
TARGETS spline DESTINATION ${PYTHON_SITELIB}
)
TARGETS ${PY_NAME} DESTINATION ${PYTHON_SITELIB}
)
ADD_PYTHON_UNIT_TEST("python-spline" "python/test/test.py" "python")
......@@ -205,7 +205,7 @@ void set_end_acc(curve_constraints_t& c, const point_t& val)
BOOST_PYTHON_MODULE(spline)
BOOST_PYTHON_MODULE(hpp_spline)
{
/** BEGIN eigenpy init**/
eigenpy::enableEigenPy();
......
from numpy import matrix
from numpy.linalg import norm
from spline import bezier, bezier6, curve_constraints, exact_cubic, from_bezier, polynom, spline_deriv_constraint
from hpp_spline import bezier, bezier6, curve_constraints, exact_cubic, from_bezier, polynom, spline_deriv_constraint
__EPS = 1e-6
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment