File tree Expand file tree Collapse file tree 3 files changed +20
-4
lines changed Expand file tree Collapse file tree 3 files changed +20
-4
lines changed Original file line number Diff line number Diff line change @@ -18,6 +18,14 @@ namespace eigenpy {
1818// /
1919std::string EIGENPY_DLLAPI printVersion (const std::string& delimiter = " ." );
2020
21+ // /
22+ // / \brief Returns the current version of Eigen3 as a string using
23+ // / the following standard:
24+ // / EIGEN_MINOR_VERSION.EIGEN_MINOR_VERSION.EIGEN_PATCH_VERSION
25+ // /
26+ std::string EIGENPY_DLLAPI
27+ printEigenVersion (const std::string& delimiter = " ." );
28+
2129// /
2230// / \brief Checks if the current version of EigenPy is at least the version
2331// / provided
Original file line number Diff line number Diff line change 11/*
22 * Copyright 2014-2019, CNRS
3- * Copyright 2018-2022 , INRIA
3+ * Copyright 2018-2023 , INRIA
44 */
55
66#include < boost/python/scope.hpp>
@@ -22,6 +22,7 @@ BOOST_PYTHON_MODULE(eigenpy_pywrap) {
2222 enableEigenPy ();
2323
2424 bp::scope ().attr (" __version__" ) = eigenpy::printVersion ();
25+ bp::scope ().attr (" __eigen_version__" ) = eigenpy::printEigenVersion ();
2526 bp::scope ().attr (" __raw_version__" ) = bp::str (EIGENPY_VERSION);
2627 bp::def (" checkVersionAtLeast" , &eigenpy::checkVersionAtLeast,
2728 bp::args (" major_version" , " minor_version" , " patch_version" ),
Original file line number Diff line number Diff line change 11//
2- // Copyright (c) 2019 INRIA
2+ // Copyright (c) 2019-2023 INRIA
33//
44
55#include " eigenpy/version.hpp"
6+ #include " eigenpy/config.hpp"
67
78#include < sstream>
8-
9- #include " eigenpy/config.hpp"
9+ #include < Eigen/Core>
1010
1111namespace eigenpy {
1212
@@ -17,6 +17,13 @@ std::string printVersion(const std::string& delimiter) {
1717 return oss.str ();
1818}
1919
20+ std::string printEigenVersion (const std::string& delimiter) {
21+ std::ostringstream oss;
22+ oss << EIGEN_MAJOR_VERSION << delimiter << EIGEN_MINOR_VERSION << delimiter
23+ << EIGEN_MINOR_VERSION;
24+ return oss.str ();
25+ }
26+
2027bool checkVersionAtLeast (unsigned int major_version, unsigned int minor_version,
2128 unsigned int patch_version) {
2229 return EIGENPY_VERSION_AT_LEAST (major_version, minor_version, patch_version);
You can’t perform that action at this time.
0 commit comments