PyQt Digest, Vol 194, Issue 31

Bryce Beagle bryce.beagle at gmail.com
Wed Sep 23 23:32:06 BST 2020


I should note that we don't use pyrcc directly, though, but pyqt5ac (
https://github.com/addisonElliott/pyqt5ac)

On Wed, Sep 23, 2020 at 3:28 PM Bryce Beagle <bryce.beagle at gmail.com> wrote:

> We've found using the resource files easier than using paths when
> distributing with PyInstaller. Also the built-in translation support for
> files is convenient.
>
> On Wed, Sep 23, 2020 at 2:19 PM <pyqt-request at riverbankcomputing.com>
> wrote:
>
>> Send PyQt mailing list submissions to
>>         pyqt at riverbankcomputing.com
>>
>> To subscribe or unsubscribe via the World Wide Web, visit
>>         https://www.riverbankcomputing.com/mailman/listinfo/pyqt
>> or, via email, send a message with subject or body 'help' to
>>         pyqt-request at riverbankcomputing.com
>>
>> You can reach the person managing the list at
>>         pyqt-owner at riverbankcomputing.com
>>
>> When replying, please edit your Subject line so it is more specific
>> than "Re: Contents of PyQt digest..."
>>
>>
>> Today's Topics:
>>
>>    1. Re: PyQt6 and SIP v6 Snapshots Available (Detlev Offenbach)
>>    2. Re: PyQt6 and SIP v6 Snapshots Available (Phil Thompson)
>>    3. Re: PyQt6 and SIP v6 Snapshots Available (Grzegorz Bokota)
>>    4. Re: PyQt6 and SIP v6 Snapshots Available (Patrick Stinson)
>>    5. Re: PyQt6 and SIP v6 Snapshots Available (Phil Thompson)
>>    6. Re: PyQt6 and SIP v6 Snapshots Available (Phil Thompson)
>>    7. Re: PyQt6 and SIP v6 Snapshots Available (Eli Schwartz)
>>
>>
>> ----------------------------------------------------------------------
>>
>> Message: 1
>> Date: Wed, 23 Sep 2020 19:33:57 +0200
>> From: Detlev Offenbach <detlev at die-offenbachs.de>
>> To: pyqt at riverbankcomputing.com
>> Subject: Re: PyQt6 and SIP v6 Snapshots Available
>> Message-ID: <01b56d5c-2770-c72b-5aa2-a9ac016c64ee at die-offenbachs.de>
>> Content-Type: text/plain; charset=utf-8; format=flowed
>>
>> Hi Phil,
>>
>> the download page says, that 'pyrcc' has been removed. What will be the
>> successor? The eric-ide sources use resource files and thus depends on
>> pyrcc.
>>
>> Detlev
>>
>> Am 20.09.20 um 18:06 schrieb Phil Thompson:
>> > PyQt6 and SIP v6 snapshots are now available on their respective
>> > download pages.
>> >
>> > Before you get too excited, PyQt6 currently builds against Qt5 but
>> > does include the planned incompatibilities with PyQt5 (summarised on
>> > the download page).
>> >
>> > Phil
>>
>> --
>> Detlev Offenbach
>> detlev at die-offenbachs.de
>>
>>
>>
>> ------------------------------
>>
>> Message: 2
>> Date: Wed, 23 Sep 2020 18:42:40 +0100
>> From: Phil Thompson <phil at riverbankcomputing.com>
>> To: Detlev Offenbach <detlev at die-offenbachs.de>
>> Cc: pyqt at riverbankcomputing.com
>> Subject: Re: PyQt6 and SIP v6 Snapshots Available
>> Message-ID: <e78d21ccd509a15812a655ceb63e2e0c at riverbankcomputing.com>
>> Content-Type: text/plain; charset=US-ASCII; format=flowed
>>
>> On 23/09/2020 18:33, Detlev Offenbach wrote:
>> > Hi Phil,
>> >
>> > the download page says, that 'pyrcc' has been removed. What will be
>> > the successor? The eric-ide sources use resource files and thus
>> > depends on pyrcc.
>>
>> I don't plan a successor as I don't see the point of resource files in a
>> Python context.
>>
>> What do you use it for?
>>
>> Phil
>>
>>
>> ------------------------------
>>
>> Message: 3
>> Date: Wed, 23 Sep 2020 21:08:26 +0200
>> From: Grzegorz Bokota <g.bokota at mimuw.edu.pl>
>> To: Phil Thompson <phil at riverbankcomputing.com>
>> Cc: Detlev Offenbach <detlev at die-offenbachs.de>, pyqt
>>         <pyqt at riverbankcomputing.com>
>> Subject: Re: PyQt6 and SIP v6 Snapshots Available
>> Message-ID:
>>         <CADUBGeQA_GNQQg0mb1cqfqr=YPUxjcV0_+PrKxHHiJ=
>> Q5tnSLw at mail.gmail.com>
>> Content-Type: text/plain; charset="utf-8"
>>
>> napari use pyrcc to compile svg icons into a python file:
>>
>>
>> https://github.com/napari/napari/blob/79500fe4ae0a8c3d0838d7330f4ac9a706b1bb9e/napari/resources/build_icons.py#L218-L223
>>
>> It means that it should be rewritten using QtSvg to run with PyQt6?
>>
>> Grzegorz Bokota
>>
>>
>> śr., 23 wrz 2020 o 19:43 Phil Thompson <phil at riverbankcomputing.com>
>> napisał(a):
>>
>> > On 23/09/2020 18:33, Detlev Offenbach wrote:
>> > > Hi Phil,
>> > >
>> > > the download page says, that 'pyrcc' has been removed. What will be
>> > > the successor? The eric-ide sources use resource files and thus
>> > > depends on pyrcc.
>> >
>> > I don't plan a successor as I don't see the point of resource files in a
>> > Python context.
>> >
>> > What do you use it for?
>> >
>> > Phil
>> >
>> -------------- next part --------------
>> An HTML attachment was scrubbed...
>> URL: <
>> https://www.riverbankcomputing.com/pipermail/pyqt/attachments/20200923/9d0ee135/attachment-0001.htm
>> >
>>
>> ------------------------------
>>
>> Message: 4
>> Date: Wed, 23 Sep 2020 11:15:01 -0800
>> From: Patrick Stinson <patrickkidd at gmail.com>
>> To: Phil Thompson <phil at riverbankcomputing.com>
>> Cc: Detlev Offenbach <detlev at die-offenbachs.de>, PyQt mailing list
>>         <pyqt at riverbankcomputing.com>
>> Subject: Re: PyQt6 and SIP v6 Snapshots Available
>> Message-ID: <023F6970-DAE4-4414-A6D0-22F9BAE733EB at gmail.com>
>> Content-Type: text/plain;       charset=us-ascii
>>
>> Phil,
>>
>> Could you explain what makes the Qt resource system obsolete in a PyQt6
>> context? The Qt resource system itself seems to play an essential role in
>> the toolkit. If you think it does not provide an essential function, then I
>> am intrigued to hear more.
>>
>> But if you do think it plays an essential role, then perhaps you are
>> suggesting that resource files are preprocessed into C++ source via rcc
>> instead of python source via a pyrcc6? If so, I could see that for
>> pyqtdeploy projects but how would one import Qt resources when running a
>> PyQt app from the command line during development?
>>
>> -Patrick
>>
>> > On Sep 23, 2020, at 9:42 AM, Phil Thompson <phil at riverbankcomputing.com>
>> wrote:
>> >
>> > On 23/09/2020 18:33, Detlev Offenbach wrote:
>> >> Hi Phil,
>> >> the download page says, that 'pyrcc' has been removed. What will be
>> >> the successor? The eric-ide sources use resource files and thus
>> >> depends on pyrcc.
>> >
>> > I don't plan a successor as I don't see the point of resource files in
>> a Python context.
>> >
>> > What do you use it for?
>> >
>> > Phil
>>
>>
>>
>> ------------------------------
>>
>> Message: 5
>> Date: Wed, 23 Sep 2020 22:10:08 +0100
>> From: Phil Thompson <phil at riverbankcomputing.com>
>> To: Grzegorz Bokota <g.bokota at mimuw.edu.pl>
>> Cc: pyqt <pyqt at riverbankcomputing.com>
>> Subject: Re: PyQt6 and SIP v6 Snapshots Available
>> Message-ID: <79ef2b5499a8d289f8f63fda70ad11c3 at riverbankcomputing.com>
>> Content-Type: text/plain; charset=US-ASCII; format=flowed
>>
>> On 23/09/2020 20:08, Grzegorz Bokota wrote:
>> > napari use pyrcc to compile svg icons into a python file:
>> >
>> >
>> https://github.com/napari/napari/blob/79500fe4ae0a8c3d0838d7330f4ac9a706b1bb9e/napari/resources/build_icons.py#L218-L223
>> >
>> > It means that it should be rewritten using QtSvg to run with PyQt6?
>>
>> Probably along with lots of other things.
>>
>> Phil
>>
>>
>> ------------------------------
>>
>> Message: 6
>> Date: Wed, 23 Sep 2020 22:14:43 +0100
>> From: Phil Thompson <phil at riverbankcomputing.com>
>> To: Patrick Stinson <patrickkidd at gmail.com>
>> Cc: PyQt mailing list <pyqt at riverbankcomputing.com>
>> Subject: Re: PyQt6 and SIP v6 Snapshots Available
>> Message-ID: <0d5734dafd164b239554118ac8b4199f at riverbankcomputing.com>
>> Content-Type: text/plain; charset=US-ASCII; format=flowed
>>
>> On 23/09/2020 20:15, Patrick Stinson wrote:
>> > Phil,
>> >
>> > Could you explain what makes the Qt resource system obsolete in a
>> > PyQt6 context?
>>
>> https://www.riverbankcomputing.com/static/Docs/pyqtdeploy/pyrcc.html
>>
>> > The Qt resource system itself seems to play an
>> > essential role in the toolkit. If you think it does not provide an
>> > essential function, then I am intrigued to hear more.
>>
>> If there is something that you cannot do with existing Python techniques
>> then I'll happily reconsider.
>>
>> > But if you do think it plays an essential role, then perhaps you are
>> > suggesting that resource files are preprocessed into C++ source via
>> > rcc instead of python source via a pyrcc6? If so, I could see that for
>> > pyqtdeploy projects but how would one import Qt resources when running
>> > a PyQt app from the command line during development?
>>
>> What is the requirement for creating Qt resources in the first place?
>>
>> Phil
>>
>>
>> ------------------------------
>>
>> Message: 7
>> Date: Wed, 23 Sep 2020 17:17:42 -0400
>> From: Eli Schwartz <eschwartz at archlinux.org>
>> To: pyqt at riverbankcomputing.com
>> Subject: Re: PyQt6 and SIP v6 Snapshots Available
>> Message-ID: <15332fc6-cf67-5699-9847-ac7fde90ad94 at archlinux.org>
>> Content-Type: text/plain; charset="utf-8"
>>
>> On 9/23/20 1:42 PM, Phil Thompson wrote:
>> > On 23/09/2020 18:33, Detlev Offenbach wrote:
>> >> Hi Phil,
>> >>
>> >> the download page says, that 'pyrcc' has been removed. What will be
>> >> the successor? The eric-ide sources use resource files and thus
>> >> depends on pyrcc.
>> >
>> > I don't plan a successor as I don't see the point of resource files in a
>> > Python context.
>> >
>> > What do you use it for?
>> >
>> > Phil
>>
>> +1
>>
>> qresource files are intended to embed random data files into
>> single-executable style software distributions, to reduce the number of
>> moving parts. This is as opposed to doing proper installation management
>> unix style, and is of limited use on Windows too, as long as people ship
>> Qt itself as shared libraries necessitating a directory structure.
>>
>> This is all fine and well for C++ programs where qresources get
>> statically linked into the executable itself, reducing the number of
>> files to be installed.
>>
>> What's the point of it for generating *.py files with that data? You end
>> up with multiple files to distribute anyway.
>>
>> pkg_resources.resource_filename() and its modern equivalent, the stdlib
>> importlib.resources, allows you to access real files through standard
>> pythonic mechanisms, without the wrapper abstractions and without an the
>> rcc compiler. There's no need to handle data blobs as python inline
>> strings, try to byte-compile something that doesn't really byte-compile
>> well, etc.
>>
>> The resulting files are easily introspectable and modifiable in the
>> built software bundle (because they are the original files) and only get
>> read at the time of use.
>>
>> Really -- what is the big attraction to using qresources in python?
>>
>> --
>> Eli Schwartz
>> Arch Linux Bug Wrangler and Trusted User
>>
>> -------------- next part --------------
>> A non-text attachment was scrubbed...
>> Name: signature.asc
>> Type: application/pgp-signature
>> Size: 1601 bytes
>> Desc: OpenPGP digital signature
>> URL: <
>> https://www.riverbankcomputing.com/pipermail/pyqt/attachments/20200923/84183a1e/attachment.sig
>> >
>>
>> ------------------------------
>>
>> Subject: Digest Footer
>>
>> _______________________________________________
>> PyQt mailing list
>> PyQt at riverbankcomputing.com
>> https://www.riverbankcomputing.com/mailman/listinfo/pyqt
>>
>>
>> ------------------------------
>>
>> End of PyQt Digest, Vol 194, Issue 31
>> *************************************
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.riverbankcomputing.com/pipermail/pyqt/attachments/20200923/ed2043b3/attachment-0001.htm>


More information about the PyQt mailing list