Repository navigation
Fix install paths - #348
christophfroehlich wants to merge 5 commits into
Conversation
saikishor
left a comment
There was a problem hiding this comment.
As far as I understood, LGTM
|
Looks like this needs to be rebased. What more do you want to do here before we land this? |
|
There were several related issues and I hoped that any of the the reporters would review it ;) |
|
It looks like this breaks Python packages. The new source-directory skip leaves the generated module outside the package's import path. The build succeeds but then the python import fails. |
|
Thanks for pulling these issues together @christophfroehlich! I tested this on Lyrical and can confirm @tylerjw's report: with I took a different approach in #393 to generate from setuptools' |
This was completely coded by GPT-5.3-Codex and needs proper review and testing.
Summary
Fix Python generated-parameter module installation/import behavior across all colcon layouts (standard, isolated, and merge-install), resolving intermittent prerelease import failures.
Problem
Tests could fail with:
ModuleNotFoundError: No module named 'generate_parameter_module_example.admittance_parameters'ModuleNotFoundError: No module named 'generate_parameter_module_example.custom_validation'Root causes were path/layout mismatches in generation output handling and empty package
__init__.pyfiles in install space.Changes
Updated src/generate_parameter_library/generate_parameter_library_py/generate_parameter_library_py/setup_helper.py:
--opt valueand--opt=value)--build-lib,--install-lib,--prefix,--root)build*roots to matchinginstall*roots (includingbuild_isolated->install_isolated)AMENT_PREFIX_PATHUpdated src/generate_parameter_library/generate_parameter_library_py/generate_parameter_library_py/generate_python_module.py:
__init__.pywith namespace path extension when missing or emptyAdded src/generate_parameter_library/example_python/generate_parameter_module_example/init.py:
Validation
All scenarios pass for
generate_parameter_module_example:48 passed, 0 failed--build-base/--install-base):48 passed, 0 failed--merge-install):48 passed, 0 failedGenerated module is now written to the correct install location in each layout.