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

[Windows] make more relocatable wrapper #1086

Merged
merged 4 commits into from
May 20, 2020

Conversation

seanyen
Copy link
Contributor

@seanyen seanyen commented May 8, 2020

This pull request is to remove a compile time variable dependency to @PYTHON_EXECUTABLE@ variable. This is motivated by trying to relocate an existing ROS installation to a different location in Windows, where one can either use tool (e.g., conda) or its own script to patch the hard-coded paths for the plain-text files (e.g., python scripts, CMake files, pkg-config files, etc.)

However, it is challenging to patch the string literal baked in binary files. So I turned to see why it is not an issue for setuptools wrapper. By reading the launcher code, I realized that it reads the SHEBANG line and use it as the hint of Python runtime location, and fallback to simply use Python.exe if none is specified or found. By this approach, the binary doesn't have the dependency to the compile time variable, and we can be more close to make catkin installation relocatable (at least with existing tools' help).

@dirk-thomas
Copy link
Member

dirk-thomas commented May 8, 2020

Please target the default branch with any changes.

@seanyen seanyen force-pushed the seanyen/relocatable_wrapper branch from a11153e to 3620f4e Compare May 8, 2020 21:36
@seanyen seanyen changed the base branch from kinetic-devel to noetic-devel May 8, 2020 21:37
@seanyen
Copy link
Contributor Author

seanyen commented May 8, 2020

Done. Btw, a little bit off-topic, are you open to add GitHub workflow to run the basic Windows CI for catkin? I can work on that.

@dirk-thomas dirk-thomas changed the title [Windows][kinetic] Make more relocatable wrapper. [Windows] make more relocatable wrapper May 8, 2020
@seanyen
Copy link
Contributor Author

seanyen commented May 8, 2020

Thanks for the feedback. The new iteration is ready for review.

@seanyen seanyen force-pushed the seanyen/relocatable_wrapper branch from f5d5431 to c71c042 Compare May 20, 2020 21:02
@dirk-thomas
Copy link
Member

Thanks for the patch.

@dirk-thomas dirk-thomas merged commit e1dff19 into ros:noetic-devel May 20, 2020
@seanyen seanyen deleted the seanyen/relocatable_wrapper branch May 20, 2020 22:14
@seanyen
Copy link
Contributor Author

seanyen commented May 20, 2020

@dirk-thomas Thanks for the merge! And it would be great this can be cherry-picked to kinetic-devel too.

dirk-thomas pushed a commit that referenced this pull request May 21, 2020
* relocatable wrapper.

* address the feedback.

* address the feedback.

* correct the usage.
@dirk-thomas
Copy link
Member

Cherry-picked to kinetic-devel in cfbfe87.

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

Successfully merging this pull request may close these issues.

2 participants