From bd7beda4c01c0a29c9058f3e411d791fbfccc831 Mon Sep 17 00:00:00 2001
From: Justin Carpentier <justin.carpentier@inria.fr>
Date: Sun, 5 Sep 2021 10:22:14 +0200
Subject: [PATCH] cmake: change python lib name (to avoid conflicts)

---
 python/CMakeLists.txt      |  1 -
 python/eigenpy/__init__.py |  6 +++---
 python/main.cpp            | 22 +++++++++++-----------
 3 files changed, 14 insertions(+), 15 deletions(-)

diff --git a/python/CMakeLists.txt b/python/CMakeLists.txt
index 5569e99f..a8a37f32 100644
--- a/python/CMakeLists.txt
+++ b/python/CMakeLists.txt
@@ -31,7 +31,6 @@ SET_TARGET_PROPERTIES(${PYWRAP}
   PROPERTIES
   PREFIX ""
   SUFFIX ${PYTHON_EXT_SUFFIX}
-  OUTPUT_NAME "${PROJECT_NAME}"
   LIBRARY_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/python/${PROJECT_NAME}"
   )
 
diff --git a/python/eigenpy/__init__.py b/python/eigenpy/__init__.py
index e71d4380..328c005e 100644
--- a/python/eigenpy/__init__.py
+++ b/python/eigenpy/__init__.py
@@ -1,6 +1,6 @@
 #
-# Copyright (c) 2017-2019 CNRS INRIA
+# Copyright (c) 2017-2021 CNRS INRIA
 #
 
-from .eigenpy import *
-from .eigenpy import __version__, __raw_version__
+from .eigenpy_pywrap import *
+from .eigenpy_pywrap import __version__, __raw_version__
diff --git a/python/main.cpp b/python/main.cpp
index 075b819b..85abcc05 100644
--- a/python/main.cpp
+++ b/python/main.cpp
@@ -1,6 +1,6 @@
 /*
  * Copyright 2014-2019, CNRS
- * Copyright 2018-2020, INRIA
+ * Copyright 2018-2021, INRIA
  */
 
 #include "eigenpy/eigenpy.hpp"
@@ -19,42 +19,42 @@
 
 using namespace eigenpy;
 
-BOOST_PYTHON_MODULE(eigenpy)
+BOOST_PYTHON_MODULE(eigenpy_pywrap)
 {
   namespace bp = boost::python;
   enableEigenPy();
-  
+
   bp::scope().attr("__version__") = eigenpy::printVersion();
   bp::scope().attr("__raw_version__") = bp::str(EIGENPY_VERSION);
   bp::def("checkVersionAtLeast",&eigenpy::checkVersionAtLeast,
           bp::args("major_version","minor_version","patch_version"),
           "Checks if the current version of EigenPy is at least the version provided by the input arguments.");
-  
+
   exposeAngleAxis();
   exposeQuaternion();
   exposeGeometryConversion();
-  
+
   exposeComputationInfo();
-  
+
   {
     bp::scope solvers = boost::python::class_<SolversScope>("solvers");
     exposeSolvers();
     exposePreconditioners();
-    
+
     register_symbolic_link_to_registered_type<Eigen::ComputationInfo>();
   }
-  
+
   {
     using namespace Eigen;
-    
+
     bp::def("is_approx",(bool (*)(const Eigen::MatrixBase<MatrixXd> &, const Eigen::MatrixBase<MatrixXd> &, const double &))&is_approx<MatrixXd,MatrixXd>,
             bp::args("A","B","prec"),
             "Returns True if A is approximately equal to B, within the precision determined by prec.");
-    
+
     bp::def("is_approx",(bool (*)(const Eigen::MatrixBase<MatrixXd> &, const Eigen::MatrixBase<MatrixXd> &))&is_approx<MatrixXd,MatrixXd>,
             bp::args("A","B"),
             "Returns True if A is approximately equal to B.");
   }
-  
+
   exposeDecompositions();
 }
-- 
GitLab