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
Use PyQt5 module path to find SIP bindings #105
Conversation
`sipconfig._pkg_config['default_mod_dir']` is currently used to find the PyQt5 SIP bindings, but this location is determined by where SIP is installed, which may not be the same as where PyQt5 is installed. A real world example of this is in Nix, where each package is installed to a separate isolated directory. Instead, we can use `PyQt5.__path__[0]`, which will always point to the location of the PyQt5 module.
This is what the generated Nix
So another possible option here could be to change it from Not sure which of these is a better fit for platforms that are on SIP 5 (Arch) and SIP 6 (NixOS default), though. For comparison, this is what it looks like on Ubuntu Focal:
|
Neither Arch Linux uses SIP 6 as well now. |
So you're right; I agree then that |
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.
LGTM, thanks for the fix and the link the the python-poppler-qt5 example. Mind opening a PR wit the fixes you'd like to see in ROS 2 on the main
branch?
`sipconfig._pkg_config['default_mod_dir']` is currently used to find the PyQt5 SIP bindings, but this location is determined by where SIP is installed, which may not be the same as where PyQt5 is installed. A real world example of this is in Nix, where each package is installed to a separate isolated directory. Instead, we can use `PyQt5.__path__[0]`, which will always point to the location of the PyQt5 module.
`sipconfig._pkg_config['default_mod_dir']` is currently used to find the PyQt5 SIP bindings, but this location is determined by where SIP is installed, which may not be the same as where PyQt5 is installed. A real world example of this is in Nix, where each package is installed to a separate isolated directory. Instead, we can use `PyQt5.__path__[0]`, which will always point to the location of the PyQt5 module.
* Use PyQt5 module path to find SIP bindings (#105) `sipconfig._pkg_config['default_mod_dir']` is currently used to find the PyQt5 SIP bindings, but this location is determined by where SIP is installed, which may not be the same as where PyQt5 is installed. A real world example of this is in Nix, where each package is installed to a separate isolated directory. Instead, we can use `PyQt5.__path__[0]`, which will always point to the location of the PyQt5 module. Co-authored-by: Akash Patel <17132214+acxz@users.noreply.github.com>
sipconfig._pkg_config['default_mod_dir']
is currently used to find the PyQt5 SIP bindings, but this location is determined by where SIP is installed, which may not be the same as where PyQt5 is installed. A real world example of this is in Nix, where each package is installed to a separate isolated directory. Instead, we can usePyQt5.__path__[0]
, which will always point to the location of the PyQt5 module. This approach was based on python-poppler-qt5.I made this PR against
melodic-devel
because it includes #95. I would appreciate it if both #95 and this PR could be included in a ROS2 release at some point.cc @mikepurvis