[Python-modules-team] Bug#823615: pyuic5 --from-imports does not work, generates absolute imports
Dmitry Shachnev
mitya57 at debian.org
Sun May 8 13:51:26 UTC 2016
Hi Julian,
On Fri, May 06, 2016 at 05:27:45PM +0200, Julian Andres Klode wrote:
> 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.ui
> That is:
> from .printsettingstoolbox import PrintSettingsToolbox
>
> Our pyuic5 however generates:
> from printsettingstoolbox import PrintSettingsToolbox
>
> Which causes hplip to fail to run.
According to upstream [1], this is a documentation bug:
--from-imports and --import-from only apply to the import of resource files.
Maybe you can fix the imports using some sed call?
[1] https://www.riverbankcomputing.com/pipermail/pyqt/2016-May/037464.html
--
Dmitry Shachnev
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://lists.alioth.debian.org/pipermail/python-modules-team/attachments/20160508/63b6dd2b/attachment.sig>
More information about the Python-modules-team
mailing list