diff --git a/CHANGELOG.md b/CHANGELOG.md index 0743b7cde..18462ca4d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). ## [Unreleased] +* Exported version for Python in https://github.com/loco-3d/crocoddyl/pull/1254 * Updated CMake packaging in https://github.com/loco-3d/crocoddyl/pull/1249 * Fixed ruff reported error in https://github.com/loco-3d/crocoddyl/pull/1248 * Fixed yapf reported errors in https://github.com/loco-3d/crocoddyl/pull/1238 diff --git a/bindings/python/crocoddyl/__init__.py b/bindings/python/crocoddyl/__init__.py index 76e321880..7db055743 100644 --- a/bindings/python/crocoddyl/__init__.py +++ b/bindings/python/crocoddyl/__init__.py @@ -7,7 +7,8 @@ import numpy as np import pinocchio -from .libcrocoddyl_pywrap import * # noqa +from .libcrocoddyl_pywrap import * +from .libcrocoddyl_pywrap import __raw_version__, __version__ def rotationMatrixFromTwoVectors(a, b): diff --git a/bindings/python/crocoddyl/crocoddyl.cpp b/bindings/python/crocoddyl/crocoddyl.cpp index d41239ef6..fd698fbba 100644 --- a/bindings/python/crocoddyl/crocoddyl.cpp +++ b/bindings/python/crocoddyl/crocoddyl.cpp @@ -1,7 +1,8 @@ /////////////////////////////////////////////////////////////////////////////// // BSD 3-Clause License // -// Copyright (C) 2019-2021, LAAS-CNRS, University of Edinburgh, INRIA, +// Copyright (C) 2019-2024, LAAS-CNRS, University of Edinburgh, INRIA, +// Heriot-Watt University // University of Oxford Copyright note valid unless otherwise stated in // individual files. All rights reserved. /////////////////////////////////////////////////////////////////////////////// @@ -17,7 +18,8 @@ namespace python { namespace bp = boost::python; BOOST_PYTHON_MODULE(libcrocoddyl_pywrap) { - bp::scope().attr("__version__") = printVersion(); + bp::scope().attr("__version__") = crocoddyl::printVersion(); + bp::scope().attr("__raw_version__") = bp::str(CROCODDYL_VERSION); eigenpy::enableEigenPy();