Skip to content

Commit

Permalink
Reenable python bindings
Browse files Browse the repository at this point in the history
  • Loading branch information
rhaschke committed Apr 29, 2024
1 parent c6e316b commit 71cc8ae
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,4 @@ add_subdirectory(image_view)
if (CATKIN_ENABLE_TESTING)
add_subdirectory(test)
endif()
if (QT_VERSION_MAJOR EQUAL 5)
add_subdirectory(python_bindings)
endif()
add_subdirectory(python_bindings)

4 comments on commit 71cc8ae

@simonschmeisser
Copy link
Contributor

Choose a reason for hiding this comment

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

I originally disabled this because there was no pyqt6 available on jammy, how did you fix that?

@rhaschke
Copy link
Contributor Author

Choose a reason for hiding this comment

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

There was nothing to fix. It simply compiled without that restriction too. However, it turned out that QT_VERSION_MAJOR was not well defined and thus python bindings were always disabled.

@simonschmeisser
Copy link
Contributor

Choose a reason for hiding this comment

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

Interesting, I get this:

/home/sis/experimente/qt6/src/python_qt_binding/cmake/sip_configure.py:2: DeprecationWarning: The distutils package is deprecated and slated for removal in Python 3.12. Use setuptools or check PEP 632 for potential alternatives
  from distutils.spawn import find_executable
Traceback (most recent call last):
  File "/home/sis/experimente/qt6/src/python_qt_binding/cmake/sip_configure.py", line 10, in <module>
    from PyQt6 import QtCore
ImportError: cannot import name 'QtCore' from 'PyQt6' (unknown location)
make[2]: *** [src/python_bindings/sip/CMakeFiles/librviz_sip.dir/build.make:108: sip/rviz_sip/Makefile] Fehler 1
make[1]: *** [CMakeFiles/Makefile2:4426: src/python_bindings/sip/CMakeFiles/librviz_sip.dir/all] Fehler 2
make[1]: *** Auf noch nicht beendete Prozesse wird gewartet …

well, looks like I locally have replaced all occurences of PyQt5 with PyQt6 in sip_configure.py which might or might not be necessary ...

Do we test if the rviz python bindings work?

@rhaschke
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Do we test if the rviz python bindings work?

I don't think so. I'm not sure, I tested this manually. Maybe, python_qt_binding just uses Qt5, which is installed as well.

Please sign in to comment.