-
Notifications
You must be signed in to change notification settings - Fork 43
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
Python test fails when installing with DESTDIR #422
Labels
bug
Something isn't working
Comments
I think we have the same situation in gz-transport as well (gazebosim/gz-transport#441 (comment)). |
I think we could copy the approach from gz-math7: |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Environment
Source @ 2b66954
Description
basic_TEST.py
can't findgz.msgs10
to importSteps to reproduce
mkdir -p build && cd build && cmake .. && make
make install DESTDIR=/tmp/foobar
ctest
Output
The test sets
PYTHONPATH
based on where it anticipates the Python module will be installed to, however:ctest
prior to installing a project and it should use artifacts from the build directories for testing. The Python tests in gz-math behave like this, for example.GZ_PYTHON_INSTALL_PATH
is changed, perhaps by settingUSE_SYSTEM_PATHS_FOR_PYTHON_INSTALLATION=ON
.DESTDIR
is used to directmake
where to install files instead ofCMAKE_INSTALL_PREFIX
, the final target directory isn't known toctest
at all.PYTHONPATH
unconditionally, it's not possible to setPYTHONPATH
manually prior to invokingctest
. Without resorting to usingCMAKE_INSTALL_PREFIX
or modifying the cmake, it's impossible to get the test to pass.Note that
DESTDIR
is the installation root mechanism used in both Debian and RPM builds, but colcon usesCMAKE_INSTALL_PREFIX
becauseDESTDIR
is a Makefile concept and doesn't typically work on Windows.The text was updated successfully, but these errors were encountered: