[PySide] Confused by PySide2 5.14.x

Richard Shaw hobbes1069 at gmail.com
Sat Apr 11 22:17:45 CEST 2020


On Sat, Apr 11, 2020 at 2:33 PM Cristián Maureira-Fredes <
Cristian.Maureira-Fredes at qt.io> wrote:

> Hello Richard,
>
> On 4/10/20 10:45 PM, Richard Shaw wrote:
>
> > I see from this commit[1] that now uic and rcc can produce python output
> > that the programs in PySide2 are no longer needed, however, I'm unclear
> > on the implementation.
>
> That's right, from Qt 5.14, both uic and rcc can now generate Python
> code by running `uic/rcc -g python`.
>
> > Form the description it appears PySide should be installing some sort of
> > wrapper but instead seems to be grabbing the uic and rcc tools installed
> > by qt4-qtbase-devel (renamed to append -qt5 on Fedora) and reinstalling
> > them, resulting in the following error while building PySide2 for Fedora:
> >
>
> To build the project you rely on a Qt installation,
> which is no news, but the important bit here is that when building
> the wheels, one needs to package the tools to distribute, since
> a person running `pip install pyside2` will not necessarily have
> a local Qt installation
>
> Then, the process do the following:
> - Gets the tools path from ${_qt5Core_install_prefix}/bin
> - Copy them to the install directory: install(FILES "${...
>
> And then, the entry points for `pyside2-uic/rcc` can be execute
> from the `pyside_tool.py` script that lies in the installation
> directory.
>
> When I wrote the commit you mentioned, I was only considering the
> wheel process, since it's our main installation method,
> and the workaround that other distributions [1] have
> is just to remove the binaries we copy to the install directory.
>

Ok, done for a quick fix now.


I think it makes sense to implement an option on the installation
> process, something like --install-tools=no, to avoid copying the
> binaries over. I believe a patch like that should not be too
> complicated to add, so maybe a contributor reading this can submit
> it and then I can review it without any problem.
> Maybe you can help us with such process?
>
> Thanks for your efforts on the Fedora package,
> hopefully we can figure out this soon :)
>

I haven't programmed python recently enough, but I suspect it wouldn't be
hard to create a python wrapper (with the original binary names) that would
call the qtbase binary with the appropriate arguments to produce python
code. Probably doesn't solve the pip issue but should work from a distro
POV.

Thanks,
Richard
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/pyside/attachments/20200411/e3777ab4/attachment.html>


More information about the PySide mailing list