Summary(pl.UTF-8): Konwerter formatów HTML/XML/CSS do PDF korzystający z narzędzi ReportLab
Name: python-%{module}
Version: 3.0.33
-Release: 4
+Release: 5
License: Apache v2.0
Group: Libraries/Python
Source0: http://pypi.python.org/packages/source/p/pisa/%{module}-%{version}.tar.gz
# Source0-md5: e2040b12211303d065bc4ae2470d2700
+Patch0: reportlab3.patch
URL: http://www.xhtml2pdf.com/
BuildRequires: python-devel >= 1:2.5
BuildRequires: python-html5lib
BuildRequires: sed >= 4.0
Requires: python
Requires: python-PIL
-Requires: python-ReportLab < 3.0
Requires: python-ReportLab >= 2.2
Requires: python-html5lib
Requires: python-pyPdf
%prep
%setup -q -n %{module}-%{version}
+%patch0 -p1
%build
%py_build
--- /dev/null
+--- pisa-3.0.33/sx/pisa3/pisa_util.py~ 2010-06-16 15:43:35.000000000 +0200
++++ pisa-3.0.33/sx/pisa3/pisa_util.py 2016-05-29 09:40:20.286049651 +0200
+@@ -51,10 +51,10 @@
+
+ rgb_re = re.compile("^.*?rgb[(]([0-9]+).*?([0-9]+).*?([0-9]+)[)].*?[ ]*$")
+
+-if not(reportlab.Version[0] == "2" and reportlab.Version[2] >= "1"):
++if not(reportlab.Version[0] == "3" or (reportlab.Version[0] == "2" and reportlab.Version[2] >= "1")):
+ raise ImportError("Reportlab Version 2.1+ is needed!")
+
+-REPORTLAB22 = (reportlab.Version[0] == "2" and reportlab.Version[2] >= "2")
++REPORTLAB22 = (reportlab.Version[0] == "3" or (reportlab.Version[0] == "2" and reportlab.Version[2] >= "2"))
+ # print "***", reportlab.Version, REPORTLAB22, reportlab.__file__
+
+ import logging