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 Loïc Bartoletti
Modified: 2019-11-06 05:16 UTC (History)
5 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, Loïc Bartoletti
no flags Details | Diff
fix sipconfig. Simplest version. (835 bytes, patch)
2019-11-05 19:44 UTC, Loïc Bartoletti
no flags Details | Diff
fix sipconfig. Simplest version. (792 bytes, patch)
2019-11-05 19:56 UTC, Loïc Bartoletti
no flags Details | Diff
fix sipconfig. Simplest version with --sipdir and an explicit variable (1.47 KB, patch)
2019-11-05 20:32 UTC, Loïc Bartoletti
no flags Details | Diff
pass sipdir explicitly (723 bytes, patch)
2019-11-05 22:18 UTC, Max Brazhnikov
no flags Details | Diff
fix sipconfig. Simplest version with --sipdir and an explicit variable (1.48 KB, patch)
2019-11-06 05:16 UTC, Loïc Bartoletti
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Loïc Bartoletti 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 Loïc Bartoletti 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 Loïc Bartoletti 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 Loïc Bartoletti 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
Comment 9 Loïc Bartoletti 2019-11-05 19:44:07 UTC
Created attachment 208888 [details]
fix sipconfig. Simplest version.
Comment 10 Loïc Bartoletti 2019-11-05 19:56:19 UTC
Created attachment 208889 [details]
fix sipconfig. Simplest version.
Comment 11 Loïc Bartoletti 2019-11-05 20:32:29 UTC
Created attachment 208891 [details]
fix sipconfig. Simplest version with --sipdir and an explicit variable

Tobias, the patch following up our discussion. Thanks
Comment 12 Max Brazhnikov freebsd_committer 2019-11-05 22:18:24 UTC
Created attachment 208894 [details]
pass sipdir explicitly

Considering than sip port has already tied to Qt5, hardcoder sipdir to PyQt5.
With this patch other ports, which rely on getting info from sipconfig may remove their workarounds (I know at least one)
Comment 13 Loïc Bartoletti 2019-11-06 05:16:56 UTC
Created attachment 208905 [details]
fix sipconfig. Simplest version with --sipdir and an explicit variable

I forgot ${PYTHON_VER} in my previous patch...