Make reportlab.patch Python3 compatible (bug #1201088).
This commit is contained in:
parent
b39bba9f08
commit
91c0f13ab4
@ -1,7 +1,7 @@
|
||||
diff -up hplip-3.14.6/installer/core_install.py.reportlab hplip-3.14.6/installer/core_install.py
|
||||
--- hplip-3.14.6/installer/core_install.py.reportlab 2014-06-03 07:31:24.000000000 +0100
|
||||
+++ hplip-3.14.6/installer/core_install.py 2014-07-21 12:08:05.374416889 +0100
|
||||
@@ -793,19 +793,19 @@ class CoreInstall(object):
|
||||
diff -up hplip-3.15.2/installer/core_install.py.reportlab hplip-3.15.2/installer/core_install.py
|
||||
--- hplip-3.15.2/installer/core_install.py.reportlab 2015-01-29 13:20:24.000000000 +0100
|
||||
+++ hplip-3.15.2/installer/core_install.py 2015-03-12 10:25:59.597102071 +0100
|
||||
@@ -880,19 +880,19 @@ class CoreInstall(object):
|
||||
log.debug("Trying to import 'reportlab'...")
|
||||
import reportlab
|
||||
|
||||
@ -33,13 +33,14 @@ diff -up hplip-3.14.6/installer/core_install.py.reportlab hplip-3.14.6/installer
|
||||
|
||||
except ImportError:
|
||||
log.debug("Failed.")
|
||||
diff -up hplip-3.14.6/installer/dcheck.py.reportlab hplip-3.14.6/installer/dcheck.py
|
||||
--- hplip-3.14.6/installer/dcheck.py.reportlab 2014-06-03 07:31:24.000000000 +0100
|
||||
+++ hplip-3.14.6/installer/dcheck.py 2014-07-21 12:08:43.349615825 +0100
|
||||
@@ -212,6 +212,13 @@ def check_lsmod(module):
|
||||
diff -up hplip-3.15.2/installer/dcheck.py.reportlab hplip-3.15.2/installer/dcheck.py
|
||||
--- hplip-3.15.2/installer/dcheck.py.reportlab 2015-01-29 13:20:24.000000000 +0100
|
||||
+++ hplip-3.15.2/installer/dcheck.py 2015-03-12 10:29:56.334733611 +0100
|
||||
@@ -215,30 +215,32 @@ def check_lsmod(module):
|
||||
|
||||
def check_version(inst_ver_str, min_ver_str='0.0'):
|
||||
log.debug("Checking: installed ver=%s min ver=%s" % (inst_ver_str, min_ver_str))
|
||||
- min_ver = 0
|
||||
+
|
||||
+ def xint(x):
|
||||
+ try:
|
||||
@ -47,10 +48,10 @@ diff -up hplip-3.14.6/installer/dcheck.py.reportlab hplip-3.14.6/installer/dchec
|
||||
+ except ValueError:
|
||||
+ return 0
|
||||
+
|
||||
min_ver = 0
|
||||
+ min_ver = [0]
|
||||
if min_ver_str != '-':
|
||||
match_obj=ver_pat.search(min_ver_str)
|
||||
@@ -219,10 +226,8 @@ def check_version(inst_ver_str, min_ver_
|
||||
try:
|
||||
ver = match_obj.group(1)
|
||||
except AttributeError:
|
||||
ver = ''
|
||||
@ -58,12 +59,14 @@ diff -up hplip-3.14.6/installer/dcheck.py.reportlab hplip-3.14.6/installer/dchec
|
||||
- min_ver = float(ver)
|
||||
- except ValueError:
|
||||
- min_ver = 0
|
||||
+
|
||||
+ min_ver = [xint(x) for x in ver.split ('.')]
|
||||
|
||||
inst_ver = 0
|
||||
- inst_ver = 0
|
||||
+ min_ver = [xint(x) for x in ver.split ('.')]
|
||||
+
|
||||
+ inst_ver = [0]
|
||||
if inst_ver_str != '-':
|
||||
@@ -231,11 +236,8 @@ def check_version(inst_ver_str, min_ver_
|
||||
match_obj=ver_pat.search(inst_ver_str)
|
||||
try:
|
||||
ver = match_obj.group(1)
|
||||
except AttributeError:
|
||||
ver = ''
|
||||
@ -76,10 +79,10 @@ diff -up hplip-3.14.6/installer/dcheck.py.reportlab hplip-3.14.6/installer/dchec
|
||||
|
||||
if inst_ver < min_ver:
|
||||
log.debug("Found, but newer version required.")
|
||||
diff -up hplip-3.14.6/ui4/sendfaxdialog.py.reportlab hplip-3.14.6/ui4/sendfaxdialog.py
|
||||
--- hplip-3.14.6/ui4/sendfaxdialog.py.reportlab 2014-06-03 07:31:26.000000000 +0100
|
||||
+++ hplip-3.14.6/ui4/sendfaxdialog.py 2014-07-21 12:08:05.375416895 +0100
|
||||
@@ -74,13 +74,14 @@ coverpages_enabled = False
|
||||
diff -up hplip-3.15.2/ui4/sendfaxdialog.py.reportlab hplip-3.15.2/ui4/sendfaxdialog.py
|
||||
--- hplip-3.15.2/ui4/sendfaxdialog.py.reportlab 2015-01-29 13:20:15.000000000 +0100
|
||||
+++ hplip-3.15.2/ui4/sendfaxdialog.py 2015-03-12 10:25:59.598102056 +0100
|
||||
@@ -75,13 +75,14 @@ coverpages_enabled = False
|
||||
if fax_enabled:
|
||||
try:
|
||||
import reportlab
|
||||
@ -100,10 +103,10 @@ diff -up hplip-3.14.6/ui4/sendfaxdialog.py.reportlab hplip-3.14.6/ui4/sendfaxdia
|
||||
coverpages_enabled = True
|
||||
else:
|
||||
log.warn("Pre-2.0 version of Reportlab installed. Fax coverpages disabled.")
|
||||
diff -up hplip-3.14.6/ui/scrollfax.py.reportlab hplip-3.14.6/ui/scrollfax.py
|
||||
--- hplip-3.14.6/ui/scrollfax.py.reportlab 2014-06-03 07:31:28.000000000 +0100
|
||||
+++ hplip-3.14.6/ui/scrollfax.py 2014-07-21 12:08:05.375416895 +0100
|
||||
@@ -52,13 +52,14 @@ coverpages_enabled = False
|
||||
diff -up hplip-3.15.2/ui/scrollfax.py.reportlab hplip-3.15.2/ui/scrollfax.py
|
||||
--- hplip-3.15.2/ui/scrollfax.py.reportlab 2015-01-29 13:20:22.000000000 +0100
|
||||
+++ hplip-3.15.2/ui/scrollfax.py 2015-03-12 10:25:59.599102042 +0100
|
||||
@@ -54,13 +54,14 @@ coverpages_enabled = False
|
||||
if fax_enabled:
|
||||
try:
|
||||
import reportlab
|
||||
|
@ -7,7 +7,7 @@
|
||||
Summary: HP Linux Imaging and Printing Project
|
||||
Name: hplip
|
||||
Version: 3.15.2
|
||||
Release: 3%{?dist}
|
||||
Release: 4%{?dist}
|
||||
License: GPLv2+ and MIT
|
||||
|
||||
Url: http://hplip.sourceforge.net/
|
||||
@ -473,6 +473,9 @@ rm -f ppds-all
|
||||
%postun libs -p /sbin/ldconfig
|
||||
|
||||
%changelog
|
||||
* Thu Mar 12 2015 Jiri Popelka <jpopelka@redhat.com> - 3.15.2-4
|
||||
- Make reportlab.patch Python3 compatible (bug #1201088).
|
||||
|
||||
* Tue Mar 3 2015 Tim Waugh <twaugh@redhat.com> - 3.15.2-3
|
||||
- Move PPDs requiring hpps to the main package along with the filter
|
||||
itself (bug #1194186).
|
||||
|
Loading…
Reference in New Issue
Block a user