From 06f9b3d1df3f0573b219fb737de1618e07dee2c6 Mon Sep 17 00:00:00 2001 From: Joris Vaillant Date: Tue, 12 Mar 2024 16:44:31 +0100 Subject: [PATCH 1/3] cmake: Add binding dependency to stubgen --- bindings/python/CMakeLists.txt | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/bindings/python/CMakeLists.txt b/bindings/python/CMakeLists.txt index 4c37b0c789..6e2eeeae1c 100644 --- a/bindings/python/CMakeLists.txt +++ b/bindings/python/CMakeLists.txt @@ -91,7 +91,11 @@ IF(BUILD_PYTHON_INTERFACE) if(GENERATE_PYTHON_STUBS) include("${CMAKE_SOURCE_DIR}/cmake/stubs.cmake") LOAD_STUBGEN() - GENERATE_STUBS(${CMAKE_CURRENT_BINARY_DIR} ${PROJECT_NAME} ${ABSOLUTE_PYTHON_SITELIB}) + # Set PYWRAP and PROJECT_NAME as stubs dependencies. + # PROJECT_NAME is mandatory (even if it's a PYWRAP dependency) + # to find PROJECT_NAME name DLL on windows. + GENERATE_STUBS(${CMAKE_CURRENT_BINARY_DIR} ${PROJECT_NAME} ${ABSOLUTE_PYTHON_SITELIB} + ${PYWRAP} ${PROJECT_NAME}) endif(GENERATE_PYTHON_STUBS) INSTALL( From 261ae2fbe33346b1654223ae2be2523f90a07b0f Mon Sep 17 00:00:00 2001 From: Joris Vaillant Date: Tue, 12 Mar 2024 16:48:10 +0100 Subject: [PATCH 2/3] changelog: Add changelog entry --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 7a24aba06b..a7aecabfc5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -14,6 +14,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). - Remove a lot of warnings ([#2139](https://github.com/stack-of-tasks/pinocchio/pull/2139)) - `MeshcatVisualizer` doesn't crash anymore when there is no collision model defined ([#2147](https://github.com/stack-of-tasks/pinocchio/pull/2147)) - Fix MSVC build ([#2155](https://github.com/stack-of-tasks/pinocchio/pull/2155)) +- Fix stub generation ([#2166](https://github.com/stack-of-tasks/pinocchio/pull/2166)) ### Added - Add `examples/floating-base-velocity-viewer.py` to visualize floating base velocity [#2143](https://github.com/stack-of-tasks/pinocchio/pull/2143) From f03754bd7004e195dae7a70c0ae1a50fb76b254d Mon Sep 17 00:00:00 2001 From: Joris Vaillant Date: Tue, 12 Mar 2024 16:49:41 +0100 Subject: [PATCH 3/3] =?UTF-8?q?ci:=20Generate=20stubs=20in=20CI=C2=A0to=20?= =?UTF-8?q?avoid=20regressions?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/macos-linux-conda.yml | 1 + .github/workflows/windows-conda.yml | 1 + 2 files changed, 2 insertions(+) diff --git a/.github/workflows/macos-linux-conda.yml b/.github/workflows/macos-linux-conda.yml index 8c8a6cf9c4..62c10cb5fa 100644 --- a/.github/workflows/macos-linux-conda.yml +++ b/.github/workflows/macos-linux-conda.yml @@ -89,6 +89,7 @@ jobs: -DPYTHON_EXECUTABLE=$(which python3) \ -DBUILD_WITH_OPENMP_SUPPORT=ON \ -DINSTALL_DOCUMENTATION=ON \ + -DGENERATE_PYTHON_STUBS=ON \ -DOpenMP_ROOT=$CONDA_PREFIX cmake --build . -j2 ctest --output-on-failure diff --git a/.github/workflows/windows-conda.yml b/.github/workflows/windows-conda.yml index 1593abfd71..69df377b03 100644 --- a/.github/workflows/windows-conda.yml +++ b/.github/workflows/windows-conda.yml @@ -86,6 +86,7 @@ jobs: -DBUILD_WITH_COLLISION_SUPPORT=ON ^ -DBUILD_TESTING=ON ^ -DINSTALL_DOCUMENTATION=ON ^ + -DGENERATE_PYTHON_STUBS=ON ^ .. :: Build