Bug 223409 - devel/py-sip: doesn't honor sip_dir
Summary: devel/py-sip: doesn't honor sip_dir
Status: In Progress
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Many People
Assignee: kde
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-11-03 22:06 UTC by lbartoletti
Modified: 2019-03-22 11:17 UTC (History)
4 users (show)

See Also:
tcberner: maintainer-feedback+


Attachments
py-sip fix with PyQt5 as default (2.32 KB, patch)
2019-01-10 21:15 UTC, lbartoletti
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description lbartoletti 2017-11-03 22:06:58 UTC
If you install some libs with sip with python 3.6 - PyQt5 for example - sip doesn't honor the default sip dir.

in python3:
import sipconfig
sipconfig.Configuration().default_sip_dir
#/usr/local/share/py36-sip

But files (for example QtXmlmod.sip) are installed in:
/usr/local/share/py-sip
for example /usr/local/share/py-sip/PyQt5/QtXml/QtXmlmod.sip

Thanks.
Comment 1 Tobias C. Berner freebsd_committer 2017-11-04 00:21:33 UTC
https://reviews.freebsd.org/D8714 i prepared a versioned sip directory in that review a while ago. Maybe you can pick the proper parts from it if you have time :) 

Mfg Tobias
Comment 2 Tobias C. Berner freebsd_committer 2018-10-27 18:28:20 UTC

*** This bug has been marked as a duplicate of bug 219641 ***
Comment 3 lbartoletti 2019-01-02 04:15:12 UTC
With the new versions of Qt, there is always an error (see qgis bug 233726#c9)


in python3:
import sipconfig
sipconfig.Configuration().default_sip_dir
#/usr/local/share/PyQtsip/3.6/sip
instead of
/usr/local/share/PyQt5/3.6/sip
Comment 4 Tobias C. Berner freebsd_committer 2019-01-02 12:28:24 UTC
(In reply to lbartoletti from comment #3)
The issue here is an error in pyqt.mk: in sip there is no _PYQT_VERSION defined, and therefore the sip-file locations line _SIPDIR_REL are broken.
Comment 5 lbartoletti 2019-01-10 21:15:18 UTC
Created attachment 201000 [details]
py-sip fix with PyQt5 as default

Tobias,

This is your patch. I only add a line for reinplace PyQt5 as default (post-install section)

Thanks
Comment 6 Tobias C. Berner freebsd_committer 2019-01-15 21:01:23 UTC
(In reply to lbartoletti from comment #5)
I think something like this should work -- but it will require an exp-run, and some more thinking :)
Comment 7 lbartoletti 2019-03-21 19:55:36 UTC
I just tried on a system without Qt4 and unfortunately SIP continues to propose /usr/local/share/PyQt4/3.6/sip as a path if we don't apply the patch
Comment 8 Tobias C. Berner freebsd_committer 2019-03-22 11:17:02 UTC
Yes cleaning up PyQt is the next step.


Mfg Tobias