g-sherman / Qgis-Plugin-Builder

Plugin generator for creating QGIS Python plugins (QGIS 3 version is now in master)
82 stars 61 forks source link

Feature Request: remove use of pyrcc in builder scripts? #126

Open rduivenvoorde opened 4 years ago

rduivenvoorde commented 4 years ago

See: https://lists.osgeo.org/pipermail/qgis-developer/2020-September/062260.html and https://www.riverbankcomputing.com/pipermail/pyqt/2020-September/043209.html

The idea is that collecting resources in one python file is for python actually not so logical.

Pyrcc will be removed (in future!) in PyQt6 and is currently use/mentioned in Makefile.

So I think Plugin Builder could maybe move from using resource paths https://github.com/g-sherman/Qgis-Plugin-Builder/blob/master/plugin_builder.py#L89 to loading the image from an image dir?

anitagraser commented 4 years ago

+1 for removing pyrcc. Also because it's a source of confusion for many first-time plugin authors.

eronlloyd commented 3 years ago

What are developers supposed to do in the interim?

I'm working through the PyQGIS Programmer's Guide and it directs the use of pyrcc5, as does the latest version of the QGIS Developer Cookbook. Unless I'm missing something, pyrcc5 is not available in <Your QGIS Install Directory>\bin\pyrcc5.exe.

For me, installing PyQt independent of QGIS adds pyrcc5.exe to my path (Windows), and seems to be working good enough. Does this seem like the best work-around for now?

g-sherman commented 3 years ago

Hi,

You can find the pyrcc5 script in the apps/Python37/Scripts of your QGIS install directory. Add the full path to Scripts to your PATH and you’ll have access to pyrcc5.

-gary

On Apr 11, 2021, at 11:28 AM, Eron Lloyd @.***> wrote:

What are developers supposed to do in the interim? I'm working through the PyQGIS Programmer's Guide https://locatepress.com/ppg3 and it directs the use of pyrcc5, as does the latest version of the QGIS Developer Cookbook https://docs.qgis.org/testing/en/docs/pyqgis_developer_cookbook/plugins/plugins.html#resource-file. Unless I'm missing something, pyrcc5 is not available in \bin\pyrcc5.exe.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/g-sherman/Qgis-Plugin-Builder/issues/126#issuecomment-817359605, or unsubscribe https://github.com/notifications/unsubscribe-auth/AADYVSVWX7GTP75ICWH43NDTIHZ4LANCNFSM4RX6RFGQ.

--------------------- Gary Sherman Founder, QGIS Project http://qgis.org -Open Source GIS Books: http://locatepress.com -Geospatial Consulting & Hosting: http://geoapt.com "We work virtually everywhere" ---------------------

palikao commented 1 year ago

For now, my workaround are reported here: https://github.com/qgis/QGIS/issues/54199

hope it helps