Bug 211414 - devel/py-qt5-core: Use/reference PEP394 compatible (suffixed) Python scripts/binaries
Summary: devel/py-qt5-core: Use/reference PEP394 compatible (suffixed) Python scripts/...
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Walter Schwarzenfeld
URL: https://reviews.freebsd.org/D8714
Keywords:
Depends on:
Blocks:
 
Reported: 2016-07-27 20:27 UTC by Yuri Victorovich
Modified: 2018-03-07 06:37 UTC (History)
8 users (show)

See Also:
rakuco: maintainer-feedback+


Attachments
patch (431 bytes, patch)
2016-07-27 20:27 UTC, Yuri Victorovich
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Yuri Victorovich freebsd_committer 2016-07-27 20:27:26 UTC
configure.py expects the 'sip' executable. For different versions of python the actual executables are under ${LOCALBASE}/bin/sip-N.N with default version symlinked as ${LOCALBASE}/bin/sip
Comment 1 Yuri Victorovich freebsd_committer 2016-07-27 20:27:53 UTC
Created attachment 173060 [details]
patch
Comment 2 Loïc Bartoletti 2016-09-27 20:16:08 UTC
Seems to be same problem/patch for all py-qt5-* (tested for svg, xml, gui)
Comment 3 Tobias C. Berner freebsd_committer 2016-09-28 19:25:12 UTC
What exactly is the issue here? 
If you set 'DEFAULT_VERSIONS+=python=3.5 python3=3.5' as described in [1] and devel/py-sip devel/py-qt5-core & co work as expected.


[1] https://wiki.freebsd.org/DEFAULT_VERSIONS
Comment 4 Yuri Victorovich freebsd_committer 2016-09-28 20:33:39 UTC
The core problem is that those files prevent installing package versions for different python versions at the same time. It is best to unconflict them by uniquifying the paths, more flexible this way.
Comment 5 groot 2016-11-09 10:35:18 UTC
Shouldn't this be fixed (given comment:2) in bsd.pyqt.mk in a generic fashion, instead of on a per-port basis? Something along the lines of:

.if ${_PYQT_VERSION} != "sip"
CONFIGURE_ARGS+="--sip=${LOCALBASE}/bin/sip-${PYTHON:D${PYTHON}:U${PYTHON_VER}}"
.endif

But it seems like sip would need fixing then as well: won't bin/sip conflict if you install sip for multiple Python versions?
Comment 6 Kubilay Kocak freebsd_committer freebsd_triage 2016-12-03 02:45:48 UTC
Cannot be In Progress without a (real) Assignee. Assign to committer who set in progress for re-assignment or re-open.

I would suggest using variables provided by Uses/python.mk to specify the suffix string.
Comment 7 Tobias C. Berner freebsd_committer 2016-12-05 08:52:36 UTC
As Adriaan suggested, it should be enough to 
CONFIGURE_ARGS+=--sip=${PREFIX}/bin/sip-${PYTHON_VER} 
in Mk/Uses/pyqt.mk -- as USE_PYTHON=conncurrent is already set, sip gets installed as sip-${PYTHON_VER} already and linked if necessary. So all that is missing seems to be to pass the correct binary to the configure script.

However, we also need to add USE_PYTHON+=concurrent to the other py-qt5 ports too -- and also install the sip-files into a versioned directory. 

I'll look into it.
Comment 8 Rainer Hurling 2016-12-22 09:01:57 UTC
Just out of curiosity: Would this also help, when py27-qt5-core is already installed and I want to also install py35-qt5-core?

ATM, I get the following error:

Installing py35-qt5-core-5.6...
pkg-static: py35-qt5-core-5.6 conflicts with py27-qt5-core-5.6 (installs files into the same place).  Problematic file: /usr/local/bin/pyuic5
Comment 9 Tobias C. Berner freebsd_committer 2016-12-22 10:30:33 UTC
Hi Rainer

Yes, the diff in https://reviews.freebsd.org/D8714 should address that issue too.


mfg Tobias
Comment 10 Rainer Hurling 2016-12-22 11:25:43 UTC
(In reply to Tobias C. Berner from comment #9)

Good news. I need this for my development of the next major release of graphics/qgis next year, with qt5 and python3 deps ...

Thanks for answering :)
Comment 11 Loïc Bartoletti 2017-07-27 04:55:21 UTC
(In reply to Tobias C. Berner from comment #9)

Hi Tobias,

Do you know when the patch will be applied?

Regards
Comment 12 Tobias C. Berner freebsd_committer 2017-08-01 16:43:57 UTC
Sorry, not yet. 

The review kind of stalled, and it seems the python ports are a bit in flux, and stuff is more broken than ever on the py3*-qt5-* side. 


mfg Tobias
Comment 13 Loïc Bartoletti 2017-10-30 22:02:20 UTC
Is this bug can be related to #219641 which seems worked?
Comment 14 Walter Schwarzenfeld freebsd_triage 2018-03-07 06:37:02 UTC
pyqt.mk )462214) shows:

    229 CONFIGURE_ARGS+=-b ${PREFIX}/bin \
    230                 -d ${PYTHONPREFIX_SITELIBDIR} \
    231                 -q ${QMAKE} \
    232                 --confirm-license \
    233                 --sip ${LOCALBASE}/bin/sip-${PYTHON_VER} \
    234                 --sipdir ${SIPDIR}

It is done, so I close here - fixed.