Title: Pyside support and usage · Issue #114 · ros-visualization/python_qt_binding · GitHub
Open Graph Title: Pyside support and usage · Issue #114 · ros-visualization/python_qt_binding
X Title: Pyside support and usage · Issue #114 · ros-visualization/python_qt_binding
Description: @sloretz Motivation I was working on ros2/rviz#889 and I have found a couple of issues with qt python integration, especially dependencies. I was looking into creating python bindings for rviz only with PySide2. No I was wondering how to...
Open Graph Description: @sloretz Motivation I was working on ros2/rviz#889 and I have found a couple of issues with qt python integration, especially dependencies. I was looking into creating python bindings for rviz only...
X Description: @sloretz Motivation I was working on ros2/rviz#889 and I have found a couple of issues with qt python integration, especially dependencies. I was looking into creating python bindings for rviz only...
Opengraph URL: https://github.com/ros-visualization/python_qt_binding/issues/114
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Pyside support and usage","articleBody":"@sloretz \r\n### Motivation\r\nI was working on https://github.com/ros2/rviz/pull/889 and I have found a couple of issues with qt python integration, especially dependencies. I was looking into creating python bindings for rviz only with PySide2. No I was wondering how to resolve dependencies and turns out there is no key for pyside2 is not in rosdistro but partially in python_qt5_bindings. This all seems kind of unorganised and super hard if you want to create bindings that only support one of the to binding generators. \r\n\r\n### Problems\r\n**pyside2 in rosdistro:**\r\nThe most essential packages python3-pyside2.qtcore, python3-pyside2.qtgui and python3-pyside2.qtwidgets are not installed by libpyside2-dev, libshiboken2-dev or shiboken in rosdistro. python-pyside2 does not even exist in Ubuntu.\r\n\r\n```\r\npython-qt5-bindings:\r\n arch: [python2-pyqt5]\r\n debian:\r\n buster: [pyqt5-dev, python-pyqt5, python-pyqt5.qtsvg, python-sip-dev, qtbase5-dev]\r\n jessie: [pyqt5-dev, python-pyqt5, python-pyqt5.qtsvg, python-sip-dev, qtbase5-dev]\r\n stretch: [pyqt5-dev, python-pyqt5, python-pyqt5.qtsvg, python-sip-dev, qtbase5-dev]\r\n fedora: [python-qt5-devel, sip]\r\n freebsd: [py27-qt5]\r\n gentoo: ['dev-python/PyQt5[gui,widgets]']\r\n nixos: [pythonPackages.pyqt5]\r\n openembedded: ['${PYTHON_PN}-pyqt5@meta-qt5']\r\n opensuse: [python2-qt5-devel, python2-sip-devel]\r\n slackware: [PyQt5]\r\n ubuntu:\r\n artful: [pyqt5-dev, python-pyqt5, python-pyqt5.qtsvg, python-sip-dev]\r\n bionic: [pyqt5-dev, python-pyqt5, python-pyqt5.qtsvg, python-sip-dev]\r\n wily: [libpyside2-dev, libshiboken2-dev, pyqt5-dev, python-pyqt5, python-pyqt5.qtsvg, python-pyside2, python-sip-dev, shiboken2]\r\n xenial: [libpyside2-dev, libshiboken2-dev, pyqt5-dev, python-pyqt5, python-pyqt5.qtsvg, python-pyside2, python-sip-dev, shiboken2]\r\n yakkety: [libpyside2-dev, libshiboken2-dev, pyqt5-dev, python-pyqt5, python-pyqt5.qtsvg, python-pyside2, python-sip-dev, shiboken2]\r\n zesty: [pyqt5-dev, python-pyqt5, python-pyqt5.qtsvg, python-sip-dev]\r\n```\r\n\r\nBy changing to the following we would at least install the same libraries for pyqt and pyside on Ubuntu:\r\n```\r\n[libpyside2-dev, libshiboken2-dev, pyqt5-dev, python-pyqt5, python-pyqt5.qtsvg, python3-pyside.qtcore, python3-pyside.qtdbus, python3-pyside.qtdesigner, python3-pyside.qtgui, python3-pyside.qthelp, python3-pyside.qtnetwork, python3-pyside.qtprintsupport, python3-pyside.qttest, python3-pyside.qtwidgets, python3-pyside.qtxml, python3-pyside.qtsvg, python-sip-dev, shiboken2]\r\n```\r\n\r\n**Interoperability of PyQt and PySide**:\r\nAdditionally, why are we not using QtPy(https://github.com/spyder-ide/qtpy) (MIT LICENSE), which has much better support for interoperability between pyside and pyqt, than just replacing names, especially for edge cases. There are also ubuntu/debian binaries in universe.\r\n\r\n### Conclusion\r\nQt for Python support is super shady and not well organised. It is very hard to understand which systemdeps to reference to install what. In addition python_qt_bindings will install both pyside2 and pyqt5. Generally, I would rather like to see an approach similar to the rmw's where we have a default and the option to install and use the the other. \r\n\r\n### Suggestion\r\n* Add python-qtpy to rosdep\r\n* Update python_qt_bindings to use QtPy and depreceate importing via python_qt_bindings\r\n* Use python_qt_bindings package to distribute the CMAKE files for binding generation\r\n* Update python-qt5-bindings rosdep key to install only default bindings (Use pyqt5 as default, as this seems to be defacto what is happening right now)\r\n* Create python-pyqt5 rosdep key\r\n* Create python-pyside2 rosdep key\r\n* Create additional rosdep keys for both pyside and pyqt in rosdistro for each extra qt lib (e.g. python-pyqt5.qtsvg and python-pyside2.qtsvg)\r\n\r\n\r\n\r\n\r\n\r\n\r\n","author":{"url":"https://github.com/hellantos","@type":"Person","name":"hellantos"},"datePublished":"2022-08-29T08:10:05.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":6},"url":"https://github.com/114/python_qt_binding/issues/114"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:264501fd-1f84-00e7-f4fc-9e9e5fa4a53f |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | B282:131F84:1A3E38F:24D7E85:6A4CC263 |
| html-safe-nonce | 04c2557d27699abcf7d290bf7f1489d469eacadea0a3b8f2bdb6c0f2d73ed460 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCMjgyOjEzMUY4NDoxQTNFMzhGOjI0RDdFODU6NkE0Q0MyNjMiLCJ2aXNpdG9yX2lkIjoiNzE1OTc5NDEzMjk5ODQ3MjI5MSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 3a0a97677edb7227ac71c89cdf80056303477ad908cec0731974813acd8d02d5 |
| hovercard-subject-tag | issue:1353881020 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/ros-visualization/python_qt_binding/114/issue_layout |
| twitter:image | https://opengraph.githubassets.com/b3582d05723e928c5c3d30b7f3266d056c1f947a1a8cd655681715d08a336f3f/ros-visualization/python_qt_binding/issues/114 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/b3582d05723e928c5c3d30b7f3266d056c1f947a1a8cd655681715d08a336f3f/ros-visualization/python_qt_binding/issues/114 |
| og:image:alt | @sloretz Motivation I was working on ros2/rviz#889 and I have found a couple of issues with qt python integration, especially dependencies. I was looking into creating python bindings for rviz only... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | hellantos |
| hostname | github.com |
| expected-hostname | github.com |
| None | 3d11bb817438277de2a940854450e83a7d32b6aeb5014e9e6b00a6423900251c |
| turbo-cache-control | no-preview |
| go-import | github.com/ros-visualization/python_qt_binding git https://github.com/ros-visualization/python_qt_binding.git |
| octolytics-dimension-user_id | 2328629 |
| octolytics-dimension-user_login | ros-visualization |
| octolytics-dimension-repository_id | 5860977 |
| octolytics-dimension-repository_nwo | ros-visualization/python_qt_binding |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 5860977 |
| octolytics-dimension-repository_network_root_nwo | ros-visualization/python_qt_binding |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | c03e7e569190bc89b638cdd4acb4b6c6b38a170a |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width