enable PYTHON_STANDARD_LAYOUT by default #735
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Hi,
This is a breaking change, but I think it is worth it. Looking at our current usage, I can see this standard layout being used everywhere:
/usr/lib/python3.13/site-packages/eigenpy/__init__.py
/opt/homebrew/lib/python3.13/site-packages/eigenpy/__init__.py
/opt/conda/lib/python3.12/site-packages/eigenpy/__init__.py
/nix/store/as3k32q45valgjl97sfsz5z1y4ylhfrs-python3-3.13.1-env/lib/python3.13/site-packages/eigenpy/__init__.py
/usr/local/lib/python3.13/site-packages/cmeel.prefix/lib/python3.13/site-packages/eigenpy/__init__.py
/opt/openrobots/lib/python3.10/site-packages/eigenpy/__init__.py
/opt/ros/humble/lib/python3.10/site-packages/eigenpy/__init__.py
The initial idea for turning this OFF was that when using what was standard at some point
cmake / make / sudo make install
, on debian/ubuntu systems, we would need to install in/usr/local/lib/python3/dist-packages
to get things work out of the box; but thatsudo make install
is no longer advised.The only problematic case I can see is with containers:
In that particular cases, users will need to add
-DPYTHON_DEB_LAYOUT=ON
following this PR, or use and configure another installation prefix.My main motivation here is ROS buildfarm, where we have to patch all our packages for all ROS versions with eg. https://github.com/ros2-gbp/eigenpy-release/blob/patches/release/humble/eigenpy/0002-ROS2-Set-PYTHON_DEB_LAYOUT-and-PYTHON_STANDARD_LAYOU.patch and maintain those patches, which is really not that easy because of the gbp workflow used by ROS. Also, testing the release of ROS packages is impossible since https://prerelease.ros.org/ is dead, and this kind of errors is not found by ros-industrial CI. So we need to blindly open a PR on ros/rodistro, wait for it to be merged, and then wait for the next buildfarm rebuild before we can detect this kind of error.