qgis / QGIS-Mac-Packager

Scripts for Official QGIS MacOS Packages
https://www.qgis.org
GNU General Public License v2.0
54 stars 21 forks source link

[QGIS] [QGIS-LTR] [macOS] Pyrcc5, syntax error in component code (rif. https://github.com/qgis/QGIS/issues/54199) #173

Open palikao opened 10 months ago

palikao commented 10 months ago

As linked, the issue is already reported in the main general bug tracing.

https://github.com/qgis/QGIS/issues/54199

In QGIS and QGIS-LTR for macOS, since very long time, the component pyrcc5, which is located in QGIS.app>Contents>MacOS>bin or QGIS-LTR.app>Contents>MacOS>bin, has a syntax error in its code.

The problem occurs when QGIS tries to use it, for example when the plugin "plugin-builder" recall it to compile the plugin package. I tested it mainly in this occasion.. But I'm not alone! It's a long time issue!

PyQt are ok.

Workaround: edit pyrcc5 file with TextEdit.app replacing 'dirname $0/python3.9' with dirname $0/python3.9 (removing quotes)

Steps to reproduce the issue

  1. install plugin "plugin-builder"
  2. activate it and open it
  3. try to compile masks to create a new plugin
  4. in the final step, when finishing, the procedure that recalls pyrcc5 fails because of pyrcc5 or..
  5. simply launch pyrcc5 in Terminal.app

Versions

All actual versions of QGIS and QGIS-LTR, all previous QGIS and QGIS-LTR

Supported QGIS version

I'm running a supported QGIS version according to the roadmap.

New profile

I tried with a new QGIS profile

Additional context

Also plugin-builder.py, on macOS, has a small syntax bug in its code (but it's only related), and this is the solution:

At lines 474-475-476 cmd = ['/Applications/QGIS.app/Contents/MacOS/bin/pyrcc5', '-o', os.path.join(self.plugin_path, 'resources.py'), os.path.join(self.plugin_path, 'resources.qrc')]

Where QGIS.app can be changed into QGIS-LTR.app

hoetmaaiers commented 2 weeks ago

Any updates on. solving this issue?