Open HiroIshida opened 1 year ago
Installation location default
The whl file. (use it by changing zip extension to whl extension) ompl-0.0.0-py3-none-any.zipv
The shared library depends on
sudo apt-get install libode-dev
sudo apt install libboost-all-dev
This patch enables to build python bindings on ubuntu20.04 Reason for fixing the version to 3.8 is that ubuntu20.04 installs only boost python for 3.8. But it still can be compiled with python-3x in most cases.
diff --git a/CMakeModules/FindPython.cmake b/CMakeModules/FindPython.cmake
index 44ad5c3a..45bb2f51 100644
--- a/CMakeModules/FindPython.cmake
+++ b/CMakeModules/FindPython.cmake
@@ -57,8 +57,8 @@ endif(NOT PYTHON_EXEC)
get_filename_component(PYTHON_EXEC_ "${PYTHON_EXEC}" REALPATH)
set(PYTHON_EXEC "${PYTHON_EXEC_}" CACHE FILEPATH "Path to Python interpreter")
-string(REGEX REPLACE "/bin/python.*" "" PYTHON_PREFIX "${PYTHON_EXEC_}")
-string(REGEX REPLACE "/bin/python.*" "" PYTHON_PREFIX2 "${PYTHON_EXEC}")
+#string(REGEX REPLACE "/bin/python.*" "" PYTHON_PREFIX "${PYTHON_EXEC_}")
+#string(REGEX REPLACE "/bin/python.*" "" PYTHON_PREFIX2 "${PYTHON_EXEC}")
if(PYTHON_EXEC)
execute_process(COMMAND "${PYTHON_EXEC}" "-c"
@@ -165,9 +165,9 @@ endfunction(find_python_module)
macro(find_boost_python)
if (PYTHON_FOUND)
foreach(_bp_libname
- "python-py${PYTHON_VERSION_MAJOR}${PYTHON_VERSION_MINOR}"
- "python${PYTHON_VERSION_MAJOR}${PYTHON_VERSION_MINOR}"
- "python${PYTHON_VERSION_MAJOR}" "python")
+ "python-py3.8"
+ "python3.8"
+ "python3" "python")
string(TOUPPER ${_bp_libname} _bp_upper)
set(_Boost_${_bp_upper}_HEADERS "boost/python.hpp")
find_package(Boost COMPONENTS ${_bp_libname} QUIET)
diff --git a/py-bindings/CMakeLists.txt b/py-bindings/CMakeLists.txt
index 4cf8c772..b72fa538 100644
--- a/py-bindings/CMakeLists.txt
+++ b/py-bindings/CMakeLists.txt
@@ -1,5 +1,6 @@
include(PythonBindingsUtils)
-if(PY_PYPLUSPLUS AND PY_PYGCCXML AND CASTXML_FOUND)
+#if(PY_PYPLUSPLUS AND PY_PYGCCXML AND CASTXML_FOUND)
+if(true)
option(OMPL_BUILD_PYBINDINGS "Build OMPL Python bindings" ON)
option(OMPL_BUILD_PYTESTS "Build/run OMPL Python tests" ON)
else()
This is custom wheel (thin wrapper) ompl-0.0.0-cp38-cp38-manylinux2014_x86_64.whl.zip
bro please help with my installation, ive done everything but my system cannot find pyplusplus and pygccxml , ive pip installed them separately but no luck
Although, OMPL library provides a python binding, the documentation is not helpful enough.
For ubuntu >20.04, for cmake's find_package(python) correctly find the python, we must do this before.
To build python binding, the important step before
make
ismake update_bindings
see: https://ompl.kavrakilab.org/python.html