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

Python qt bindings support both #416

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

Pleune
Copy link

@Pleune Pleune commented Jun 6, 2024

I have been bounding around trying to get all of the pyqt stuff to work across all of the distros for a while now... and I think this is my final solution. It seems to keep everything happy, and works even for the most current versions of everything, without requiring any huge overrides, or any patches that will break when files are updated upstream.

Some packages need specifically pyqt or pyside to be loaded by python-qt-binding. This changes the overrides to support both.

Annoyingly, in recent python-qt-binding releases, sip_configure.py, the cmake helper script, rewrites QtCoremod.sip, which is outside of the nix build area and causes a build failure. See ros-visualization/python_qt_binding@e78372f

This is the same patch that is applied from the AUR here. So sed patch out these changes. Then move the ros1 rviz patch to distro-overlay.nix to apply to everything.

Tested with:

  • ROS2 rolling using rqt_image_viewer
  • ROS2 humble using rqt_image_viewer
  • ROS1 noetic using rqt_image_viewer and rziv

See #404

@Pleune
Copy link
Author

Pleune commented Jul 9, 2024

this patch is still needed for some QUI apps to work, including rqt, in the newly generated jazzy and rolling distros.

@Pleune
Copy link
Author

Pleune commented Jul 9, 2024

shiboken2 is now marked broken with python312 NixOS/nixpkgs@603c034

sip4 is also disabled for python312 NixOS/nixpkgs@544c197

@Pleune
Copy link
Author

Pleune commented Jul 9, 2024

ROS2 meta ticket involving upgrade from qt5 -> qt6, which would solve these 3.12 compatibility issues ros2/ros2#1452

@Pleune Pleune force-pushed the python-qt-bindings-support-both branch from 6ab5028 to 4f3e76d Compare July 9, 2024 16:01
In ros-visualization/python_qt_binding@e78372f,
the sip_configure.py cmake helper script in python-qt-binding was
updated to live-patch the QtCoremod.sip file in a temp directory. Which
is the same change that is applied from the aur here. The live patch
thing breaks the build as it is writing to a file outside of the nix
build area. Remove that write and apply the patch from the AUR.

Also moved the ros1 rviz pyqt patch into the regular python-qt-binding
overlay to allow any downstream packages to have functional pyqt if that
is what ends up being used.
@Pleune Pleune force-pushed the python-qt-bindings-support-both branch from 4f3e76d to 46f3d14 Compare July 17, 2024 16:08
@Pleune
Copy link
Author

Pleune commented Jul 17, 2024

Submitted PR upstream to update sip4 and pyside2/shiboken2 to support Python312. NixOS/nixpkgs#327976

With these changes, I can now open and use rqt with all the plugins with 3.12 from current nixpkgs/master, using either backend.

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

Successfully merging this pull request may close these issues.

None yet

1 participant