-
Notifications
You must be signed in to change notification settings - Fork 68
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
Export PYTHONPATH when sourcing the workspace #271
Conversation
Signed-off-by: ahcorde <[email protected]>
Codecov Report
@@ Coverage Diff @@
## ign-math6 #271 +/- ##
==========================================
Coverage 99.41% 99.41%
==========================================
Files 67 67
Lines 6374 6374
==========================================
Hits 6337 6337
Misses 37 37 Continue to review full report at Codecov.
|
@@ -0,0 +1,4 @@ | |||
# Configuration file for colcon (https://colcon.readthedocs.io). | |||
{ | |||
"hooks": ["share/ignition-math6/setup.sh"] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Similar to gazebosim/gazebo-classic#3066, I think we should be careful about adding files specific to certain tools, and instead try to find solutions that apply to most setups.
With that in mind, we should at a minimum add instructions for users to source the setup file on their own when using debs or plain cmake.
@ahcorde , as mentioned in a meeting, let's add documentation instructing users to source the setup file directly when using plain CMake. Also note that this is not needed for debian installations, as we're already installing the scripts in the correct path. |
@@ -0,0 +1,3 @@ | |||
# generated from ignition-math/setup.sh.in | |||
|
|||
export PYTHONPATH=@CMAKE_INSTALL_PREFIX@/@IGN_PYTHON_INSTALL_PATH@:$PYTHONPATH |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is being set to install/lib/python/swig
, should it be install/lib/python
?
This tutorial explains how to do it. Closing this |
Signed-off-by: ahcorde [email protected]
🦟 Bug fix
Summary
This PR is related to this issues #270
When compiling from source and loading the workspace we should be able to setup the PYTHONPATH to allow user to use the Python bindings
There is a discussion in the ign-cmake gazebosim/gz-cmake#185 repository to include this functionality.
One cons about this solution if that if you source the workspace several times you will append the path to the pythonpath each time.
Checklist
codecheck
passed (See contributing)Note to maintainers: Remember to use Squash-Merge