Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Exported __version__ to root module #1254

Merged
merged 2 commits into from
May 30, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 2 additions & 1 deletion bindings/python/crocoddyl/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down
6 changes: 4 additions & 2 deletions bindings/python/crocoddyl/crocoddyl.cpp
Original file line number Diff line number Diff line change
@@ -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.
///////////////////////////////////////////////////////////////////////////////
Expand All @@ -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();

Expand Down
Loading