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

add configure-time flag to skip parent_prefix_path #115

Merged

Conversation

dirk-thomas
Copy link
Contributor

@dirk-thomas dirk-thomas commented Jun 4, 2020

Related to ros2/ros2#929.

The diff is best looked at while ignoring indentation changes: https://github.com/ament/ament_package/pull/115/files?w=1

No CI since this isn't covered by it anyway but needs to be manually verified.

Signed-off-by: Dirk Thomas <dirk-thomas@users.noreply.github.com>
Signed-off-by: Dirk Thomas <dirk-thomas@users.noreply.github.com>
@dirk-thomas
Copy link
Contributor Author

Using this modified template the setup.py file for e.g. Foxy can be generated with this logic:

import ament_package.templates
p = ament_package.templates.get_prefix_level_template_path('setup.sh.in')
print(ament_package.templates.configure_file(p, {'CMAKE_INSTALL_PREFIX': '/opt/ros/foxy', 'SKIP_PARENT_PREFIX_PATH': 'SKIP_PARENT_PREFIX_PATH'}), end='')

Copy link
Contributor

@nuclearsandwich nuclearsandwich left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Passes a visual inspection. Getting set up to test these changes in a workspace.

@nuclearsandwich
Copy link
Contributor

I built modified ament_package and ros_workspace debs, using the former when building the latter, and then pushed that modified ros_workspace deb to the container I did my tests in with this result:

root@ros2-focal:~# time bash -c '. /opt/ros/foxy/local_setup.bash'

real    0m0.157s
user    0m0.124s
sys     0m0.038s
root@ros2-focal:~# time bash -c '. /opt/ros/foxy/setup.bash'

real    0m0.158s
user    0m0.138s
sys     0m0.025s

@dirk-thomas dirk-thomas merged commit 306c508 into master Jun 5, 2020
@delete-merged-branch delete-merged-branch bot deleted the dirk-thomas/configure-option-to-skip-parent-prefix-path branch June 5, 2020 16:22
@dirk-thomas
Copy link
Contributor Author

Fast-forwarded the squashed commit from master to foxy.

dirk-thomas added a commit that referenced this pull request Jun 5, 2020
* move lines

Signed-off-by: Dirk Thomas <dirk-thomas@users.noreply.github.com>

* check for USE_PARENT_PREFIX_PATH

Signed-off-by: Dirk Thomas <dirk-thomas@users.noreply.github.com>
@dirk-thomas dirk-thomas mentioned this pull request Jun 5, 2020
dirk-thomas added a commit that referenced this pull request Jun 5, 2020
* [windows] fix _ament_python_executable fallback code path (#113)

Signed-off-by: Dirk Thomas <dirk-thomas@users.noreply.github.com>

* add configure-time flag to skip parent_prefix_path (#115)

* move lines

Signed-off-by: Dirk Thomas <dirk-thomas@users.noreply.github.com>

* check for USE_PARENT_PREFIX_PATH

Signed-off-by: Dirk Thomas <dirk-thomas@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants