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

Fix python stub generation #2166

Merged
merged 3 commits into from
Mar 12, 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 .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
Loading