On Sat 15/09/2018 18:28, Klemens Nanni wrote:
> On Sat, Sep 15, 2018 at 05:15:45PM +0200, Björn Ketelaars wrote:
> > Instead of using the bundled qtpy use the version in ports. No issues
> > found on amd64.
> Sounds good. What about this from upstream README:
>
> Set QT_API=pyqt4 in your environment if you have both versions
> of PyQt installed and want to ensure that PyQt4 is used.
>
> Dependencies are lacking ${MODPY_FLAVOR}.
>
> git-cola runs fine with your diff but I still see this:
>
> /usr/local/lib/python2.7/site-packages/qtpy/__init__.py:211:
> RuntimeWarning: Selected binding "pyqt5" could not be found, using "pyqt"
> 'using "{}"'.format(initial_api, API), RuntimeWarning)
>
>
> As a side note, git-cola does not seem to work with Python 3 on our site:
>
> $ git-cola
> Traceback (most recent call last):
> File "/usr/local/lib/python3.6/site-packages/qtpy/__init__.py", line
> 199, in <module>
> from PySide import __version__ as PYSIDE_VERSION # analysis:ignore
> ModuleNotFoundError: No module named 'PySide'
>
> During handling of the above exception, another exception occurred:
>
> Traceback (most recent call last):
> File "/usr/local/bin/git-cola", line 53, in <module>
> from cola.main import main
> File "/usr/local/share/git-cola/lib/cola/main.py", line 6, in <module>
> from . import app
> File "/usr/local/share/git-cola/lib/cola/app.py", line 15, in <module>
> from qtpy import QtCore
> File "/usr/local/lib/python3.6/site-packages/qtpy/__init__.py", line
> 205, in <module>
> raise PythonQtError('No Qt bindings could be found')
> qtpy.PythonQtError: No Qt bindings could be found
Discussed with kn@ off list:
New diff adding ${MODPY_FLAVOR} to deps having py flavors.
Tested a build with both py-qt4 and py-qt5 installed:
- Starting git-cola results in py-qt5 being used
- removing py-qt5, and starting git-cola again results in py-qt4 being
used
Above is expected behaviour. Please note that one can force use of
py-qt4 by setting QT_API=pyqt4 in the environment.
OK?
Index: Makefile
===================================================================
RCS file: /cvs/ports/devel/git-cola/Makefile,v
retrieving revision 1.24
diff -u -p -r1.24 Makefile
--- Makefile 8 Sep 2018 03:55:10 -0000 1.24
+++ Makefile 15 Sep 2018 20:01:13 -0000
@@ -4,6 +4,7 @@ COMMENT = python powered git gui
MODPY_EGG_VERSION= 3.2
DISTNAME = ${GH_PROJECT}-${MODPY_EGG_VERSION}
+REVISION = 0
GH_ACCOUNT = git-cola
GH_PROJECT = git-cola
@@ -13,6 +14,8 @@ CATEGORIES = devel x11
HOMEPAGE = https://git-cola.github.io/
+MAINTAINER = Bjorn Ketelaars <[email protected]>
+
# GPLv2 only
PERMIT_PACKAGE_CDROM= Yes
@@ -21,17 +24,21 @@ MODULES = lang/python
BUILD_DEPENDS = devel/gettext-tools \
devel/git \
textproc/xxdiff \
- x11/py-qt4
+ x11/py-qt4 \
+ x11/py-qtpy${MODPY_FLAVOR}
RUN_DEPENDS = devel/desktop-file-utils \
devel/git \
textproc/xxdiff \
- x11/py-qt4
+ x11/py-qt4 \
+ x11/py-qtpy${MODPY_FLAVOR}
-TEST_DEPENDS = devel/py-mock \
- devel/py-test
+TEST_DEPENDS = devel/py-mock${MODPY_FLAVOR} \
+ devel/py-test${MODPY_FLAVOR}
USE_GMAKE = Yes
+
+MAKE_ENV = GIT_COLA_NO_VENDOR_LIBS=1
MODPY_ADJ_FILES= share/git-cola/bin/git-xbase
Index: pkg/PLIST
===================================================================
RCS file: /cvs/ports/devel/git-cola/pkg/PLIST,v
retrieving revision 1.13
diff -u -p -r1.13 PLIST
--- pkg/PLIST 8 Sep 2018 03:55:10 -0000 1.13
+++ pkg/PLIST 15 Sep 2018 20:01:13 -0000
@@ -297,50 +297,6 @@ share/git-cola/lib/cola/widgets/toolbar.
share/git-cola/lib/cola/widgets/toolbar.pyc
share/git-cola/lib/cola/widgets/toolbarcmds.py
share/git-cola/lib/cola/widgets/toolbarcmds.pyc
-share/git-cola/lib/qtpy/
-share/git-cola/lib/qtpy/QtCore.py
-share/git-cola/lib/qtpy/QtCore.pyc
-share/git-cola/lib/qtpy/QtDesigner.py
-share/git-cola/lib/qtpy/QtDesigner.pyc
-share/git-cola/lib/qtpy/QtGui.py
-share/git-cola/lib/qtpy/QtGui.pyc
-share/git-cola/lib/qtpy/QtHelp.py
-share/git-cola/lib/qtpy/QtHelp.pyc
-share/git-cola/lib/qtpy/QtMultimedia.py
-share/git-cola/lib/qtpy/QtMultimedia.pyc
-share/git-cola/lib/qtpy/QtNetwork.py
-share/git-cola/lib/qtpy/QtNetwork.pyc
-share/git-cola/lib/qtpy/QtOpenGL.py
-share/git-cola/lib/qtpy/QtOpenGL.pyc
-share/git-cola/lib/qtpy/QtPrintSupport.py
-share/git-cola/lib/qtpy/QtPrintSupport.pyc
-share/git-cola/lib/qtpy/QtSql.py
-share/git-cola/lib/qtpy/QtSql.pyc
-share/git-cola/lib/qtpy/QtSvg.py
-share/git-cola/lib/qtpy/QtSvg.pyc
-share/git-cola/lib/qtpy/QtTest.py
-share/git-cola/lib/qtpy/QtTest.pyc
-share/git-cola/lib/qtpy/QtWebEngineWidgets.py
-share/git-cola/lib/qtpy/QtWebEngineWidgets.pyc
-share/git-cola/lib/qtpy/QtWidgets.py
-share/git-cola/lib/qtpy/QtWidgets.pyc
-share/git-cola/lib/qtpy/__init__.py
-share/git-cola/lib/qtpy/__init__.pyc
-share/git-cola/lib/qtpy/_patch/
-share/git-cola/lib/qtpy/_patch/__init__.py
-share/git-cola/lib/qtpy/_patch/__init__.pyc
-share/git-cola/lib/qtpy/_patch/qcombobox.py
-share/git-cola/lib/qtpy/_patch/qcombobox.pyc
-share/git-cola/lib/qtpy/_patch/qheaderview.py
-share/git-cola/lib/qtpy/_patch/qheaderview.pyc
-share/git-cola/lib/qtpy/_version.py
-share/git-cola/lib/qtpy/_version.pyc
-share/git-cola/lib/qtpy/compat.py
-share/git-cola/lib/qtpy/compat.pyc
-share/git-cola/lib/qtpy/py3compat.py
-share/git-cola/lib/qtpy/py3compat.pyc
-share/git-cola/lib/qtpy/uic.py
-share/git-cola/lib/qtpy/uic.pyc
share/locale/cs/LC_MESSAGES/git-cola.mo
share/locale/de/LC_MESSAGES/git-cola.mo
share/locale/es/LC_MESSAGES/git-cola.mo