[PyQt] Fwd: pyuic5 --from-imports does not work, generates absolute imports

Dmitry Shachnev mitya57 at ubuntu.com
Sun May 8 10:46:53 BST 2016


Forwarding a bug report from Debian (https://bugs.debian.org/823615),
reported against PyQt 5.6:

----- Begin forwarded message -----

Hi, I'm trying to rebuild the .py files in hplip from their UI files, but pyuic5
always generates absolute imports instead of relative ones, causing the generated
code to fail.

For example, run pyuic5 --from-imports on
 http://anonscm.debian.org/cgit/printing/hplip.git/tree/ui5/devmgr5_base.ui
It should generate code like this:
 http://anonscm.debian.org/cgit/printing/hplip.git/tree/ui5/devmgr5_base.py
That is:
 from .printsettingstoolbox import PrintSettingsToolbox

Our pyuic5 however generates:
 from printsettingstoolbox import PrintSettingsToolbox

Which causes hplip to fail to run.

----- End forwarded message -----

(I have done s/.ui/.py/ on the second link because I assume this is what the
original reporter meant.)

--
Dmitry Shachnev
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <https://www.riverbankcomputing.com/pipermail/pyqt/attachments/20160508/9a3fde13/attachment.sig>


More information about the PyQt mailing list