Skip to content

Keep Python version info out of the source tree - #242

Open
Daniiiil1 wants to merge 1 commit into
NVIDIA-ISAAC-ROS:mainfrom
Daniiiil1:fix/version-info-build-dir
Open

Keep Python version info out of the source tree#242
Daniiiil1 wants to merge 1 commit into
NVIDIA-ISAAC-ROS:mainfrom
Daniiiil1:fix/version-info-build-dir

Conversation

@Daniiiil1

Copy link
Copy Markdown

Summary

Pass setuptools' finalized build_lib path into the version-info generator instead of always deriving an output directory from the process working directory.

Root cause

ament_python invokes setup.py from the package source directory. Building the path from os.getcwd() therefore creates <source>/build/version_info.yaml and leaves the checkout dirty even when colcon is configured for an out-of-source build.

The optional build_dir argument preserves the existing fallback for direct callers while GenerateVersionInfoCommand uses the correct setuptools build location. Installation to share/<package> is unchanged.

Validation

  • python3 -m py_compile isaac_ros_common/scripts/isaac_ros_common-version-info.py
  • mocked generator invocation verified that the YAML path is under the supplied build directory and that no source-tree build directory is created

Closes #239

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

version_info.yaml is written into the source tree for ament_python packages

1 participant