diff --git a/.gitignore b/.gitignore index c8481d5..2efbdd6 100644 --- a/.gitignore +++ b/.gitignore @@ -7,3 +7,4 @@ /hgview-1.10.5.tar.gz /hgview-1.10.6.tar.gz /hgview-1.12.0.tar.gz +/hgview-1.13.0.tar.gz diff --git a/hgview.spec b/hgview.spec index 3f99c6e..a47ac4d 100644 --- a/hgview.spec +++ b/hgview.spec @@ -1,7 +1,7 @@ %define curses 0 Name: hgview -Version: 1.12.0 -Release: 4%{?dist} +Version: 1.13.0 +Release: 1%{?dist} Summary: Mercurial interactive Qt based history viewer License: GPLv2+ @@ -11,6 +11,7 @@ Source0: http://download.logilab.org/pub/%{name}/%{name}-%{version}.tar.g Source1: %{name}.png # http://www.logilab.org/ticket/103668 Patch1: hgview-man-path.patch +Patch2: pyqt4sip.patch BuildArch: noarch BuildRequires: python2-devel @@ -24,7 +25,6 @@ Requires: %{name}-common = %{version}-%{release} Requires: python2-docutils Requires: PyQt4 Requires: python2-qscintilla -Requires: python2-sip %if %{curses} %else @@ -72,6 +72,9 @@ This package provides common files for the Qt and curses based UIs. %prep %setup -q %patch1 +%patch2 -p1 + +sed -i '1,1s/python3/python2/g' bin/hgview %build @@ -185,6 +188,10 @@ rm $RPM_BUILD_ROOT%{_datadir}/doc/%{name}/examples/description.css %changelog +* Sun Nov 17 2019 Mads Kiilerich - 1.13.0-1 +- hgview 1.13.0 +- workaround for sip module moving into PyQt4 + * Sun Oct 13 2019 Mads Kiilerich - 1.12.0-4 - Fix macro usage to actually skip hgview-curses ... diff --git a/pyqt4sip.patch b/pyqt4sip.patch new file mode 100644 index 0000000..15c0634 --- /dev/null +++ b/pyqt4sip.patch @@ -0,0 +1,37 @@ +# HG changeset patch +# User Mads Kiilerich +# Date 1574009200 -3600 +# Sun Nov 17 17:46:40 2019 +0100 +# Node ID e2122816b971cbc82e41de319427b51909fd9225 +# Parent 09e3a0062b99427e9a933bdefd97f4c2e0b2ce6c +qt4: support PyQt4 v4.12.2 where sip became a sub module + +https://www.riverbankcomputing.com/static/Docs/PyQt4/incompatibilities.html#pyqt-v4-12-2 : + +In previous versions PyQt4 used the copy of the sip module usually installed in +the site-packages directory and applications accessed it using as follows: + + import sip + +This version includes a private copy of the module. Applications should access +it as follows: + + from PyQt4 import sip + +diff --git a/hgviewlib/qt4/__init__.py b/hgviewlib/qt4/__init__.py +--- a/hgviewlib/qt4/__init__.py ++++ b/hgviewlib/qt4/__init__.py +@@ -24,7 +24,12 @@ import os.path as osp + import sys + import datetime as dt + +-import sip ++try: ++ from PyQt4 import sip ++ sip.SIP_VERSION_STR ++except ImportError: ++ import sip ++ + sip.setapi('QString', 2) + sip.setapi('QVariant', 2) + sip.setapi('QDate', 2) diff --git a/sources b/sources index 8a24e71..0dc1264 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (hgview-1.12.0.tar.gz) = e0104ca40b77e8c86f3a72348dbd45bdf7b0d971c6eb44031771d77241cf0bdbb14953ed55841cb1055652409db40c569b56297bd346fac77b3b287256e5ac4c +SHA512 (hgview-1.13.0.tar.gz) = 2771eede2489c24429e4fb41938106395014fd283964f04db8458e471a6a8bd031613bc38d68a9eeef992e2f7c385f56e25d4a48e4759691970229795f216e88