Skip to content

Commit

Permalink
Merge pull request #2166 from jorisv/topic/fix_stubgen
Browse files Browse the repository at this point in the history
Fix python stub generation
  • Loading branch information
jcarpent committed Mar 12, 2024
2 parents 96e0643 + f03754b commit 30a52cd
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 1 deletion.
1 change: 1 addition & 0 deletions .github/workflows/macos-linux-conda.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/windows-conda.yml
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@ jobs:
-DBUILD_WITH_COLLISION_SUPPORT=ON ^
-DBUILD_TESTING=ON ^
-DINSTALL_DOCUMENTATION=ON ^
-DGENERATE_PYTHON_STUBS=ON ^
..
:: Build
Expand Down
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
6 changes: 5 additions & 1 deletion bindings/python/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down

0 comments on commit 30a52cd

Please sign in to comment.