diff --git a/python-xhtml2pdf.changes b/python-xhtml2pdf.changes
index 8faff28..3e1ca03 100644
--- a/python-xhtml2pdf.changes
+++ b/python-xhtml2pdf.changes
@@ -1,3 +1,9 @@
+-------------------------------------------------------------------
+Tue Dec 14 16:30:32 UTC 2017 - opensuse@dstoecker.de
+
+- update to 0.2b
+- support build for python3
+
-------------------------------------------------------------------
Fri Aug 12 06:12:16 UTC 2016 - opensuse@dstoecker.de
diff --git a/python-xhtml2pdf.spec b/python-xhtml2pdf.spec
index 4f7426d..194ce1d 100644
--- a/python-xhtml2pdf.spec
+++ b/python-xhtml2pdf.spec
@@ -1,7 +1,7 @@
#
# spec file for package python-xhtml2pdf
#
-# Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany.
+# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -16,8 +16,10 @@
#
+%{?!python_module:%define python_module() python-%{**} python3-%{**}}
+%define skip_python3 1
Name: python-xhtml2pdf
-Version: 0.1b2
+Version: 0.2b
Release: 0
Summary: PDF Generator Using HTML and CSS
License: Apache-2.0
@@ -26,22 +28,21 @@ Url: https://github.com/xhtml2pdf/
Source: http://pypi.python.org/packages/source/x/xhtml2pdf/xhtml2pdf-%{version}.tar.gz
# PATCH-FIX-OPENSUSE no_optimize.patch - Don't generate .pyo files during build
Patch0: no_optimize.patch
+BuildRequires: %{python_module nose}
+BuildRequires: %{python_module setuptools}
BuildRequires: python-devel
-BuildRequires: python-nose
-BuildRequires: python-setuptools
+BuildRequires: python-rpm-macros
Requires: python-Pillow
Requires: python-PyPDF2
-Requires: python-html5lib
-Requires: python-html5lib
+Requires: python-html5lib == 1.0b10
Requires: python-httplib2
Requires: python-reportlab >= 3.0
Requires: python-six
+Conflicts: python-pisa
BuildRoot: %{_tmppath}/%{name}-%{version}-build
-%if 0%{?suse_version} && 0%{?suse_version} <= 1110
-%{!?python_sitelib: %global python_sitelib %(python -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}
-%else
BuildArch: noarch
-%endif
+
+%python_subpackages
%description
xhtml2pdf is a html2pdf converter using the ReportLab Toolkit, the HTML5lib and
@@ -56,12 +57,12 @@ able to generate PDF templates very quickly without learning new technologies.
%patch0 -p1
%build
-python setup.py build
+%python_build
%install
-python setup.py install --prefix=%{_prefix} --root=%{buildroot}
+%python_install
-%files
+%files %python_files
%defattr(-,root,root,-)
%doc LICENSE.txt README.rst
%{python_sitelib}/*
diff --git a/xhtml2pdf-0.1b2.tar.gz b/xhtml2pdf-0.1b2.tar.gz
deleted file mode 100644
index 122a2b5..0000000
--- a/xhtml2pdf-0.1b2.tar.gz
+++ /dev/null
@@ -1,3 +0,0 @@
-version https://git-lfs.github.com/spec/v1
-oid sha256:7ebd1388bc8cc5bf5033e9665dbc879bb6c77e0f4743a77bf93eeed9ed0e4d48
-size 8931914
diff --git a/xhtml2pdf-0.2b.tar.gz b/xhtml2pdf-0.2b.tar.gz
new file mode 100644
index 0000000..54a410f
--- /dev/null
+++ b/xhtml2pdf-0.2b.tar.gz
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:831d851061e493ea617ed6382bb2b5e4e201660e285a07cca7407c1286fc7e78
+size 8952606