Always use the same sipname as PyQt
ClosedPublic

Authored by arojas on Jul 17 2018, 11:03 AM.

Details

Summary

PyQt>=5.11 uses 'PyQt.sip' sipname by default, but some distributions (such ad Debian) patch it to use 'sip'. Get the sipname from the PyQt configuration instead of setting it depending on the PyQt version.

Test Plan

Uses the correct sipname on Arch with PyQt 5.10 and PyQt 5.11. Needs testing on Debian-based.

Diff Detail

Repository
R37 Krita
Lint
Lint Skipped
Unit
Unit Tests Skipped
arojas created this revision.Jul 17 2018, 11:03 AM
Restricted Application added a reviewer: Krita. · View Herald TranscriptJul 17 2018, 11:03 AM
Restricted Application added a project: Krita. · View Herald Transcript
arojas requested review of this revision.Jul 17 2018, 11:03 AM
arojas updated this revision to Diff 37948.Jul 17 2018, 12:37 PM

Remove space after '-n', apparently sip doesn't like it

rempt accepted this revision.Jul 17 2018, 2:31 PM

Hm, I'm afraid it doesn't work for me on Neon 18.04:

[100%] Generating krita/sipkritapart0.cpp

sip: Usage: sip [-h] [-V] [-a file] [-b file] [-B tag] [-c dir] [-d file] [-D] [-e] [-f] [-g] [-I dir] [-j #] [-k] [-m file] [-o] [-p module] [-P] [-r] [-s suffix] [-t tag] [-w] [-x feature] [-X id:file] [-y file] [-z file] [@file] [file]
plugins/extensions/pykrita/sip/CMakeFiles/python_module_PyKrita_krita.dir/build.make:93: recipe for target 'plugins/extensions/pykrita/sip/krita/sipkritapart0.cpp' failed
make[2]: * [plugins/extensions/pykrita/sip/krita/sipkritapart0.cpp] Error 1
make[2]:
* Deleting file 'plugins/extensions/pykrita/sip/krita/sipkritapart0.cpp'
CMakeFiles/Makefile2:28895: recipe for target 'plugins/extensions/pykrita/sip/CMakeFiles/python_module_PyKrita_krita.dir/all' failed
make[1]: * [plugins/extensions/pykrita/sip/CMakeFiles/python_module_PyKrita_krita.dir/all] Error 2
Makefile:140: recipe for target 'all' failed
make:
* [all] Error 2
boud@boud-ThinkPad-T470p:~/dev/b-krita/plugins/extensions/pykrita/sip$

This revision is now accepted and ready to land.Jul 17 2018, 2:31 PM

Hm, I'm afraid it doesn't work for me on Neon 18.04:

With which sip and pyqt versions?

I just tested on Neon Dev with PyQt 5.11 and python plugins build and work fine

arojas updated this revision to Diff 37986.Jul 17 2018, 9:59 PM

Fix build with older sip

rempt accepted this revision.Jul 18 2018, 9:42 AM

Yes, it works :-)

This revision was automatically updated to reflect the committed changes.