14
0

- Cleanup a bit

- Update the requirements to match the upstream recommendations
- Run the tests
- Really enable the python3

OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-xhtml2pdf?expand=0&rev=6
This commit is contained in:
Tomáš Chvátal
2017-12-15 13:33:00 +00:00
committed by Git OBS Bridge
parent 368dbfd6e9
commit 59cbd779dd
2 changed files with 33 additions and 12 deletions

View File

@@ -1,3 +1,11 @@
-------------------------------------------------------------------
Fri Dec 15 13:34:51 UTC 2017 - tchvatal@suse.com
- Cleanup a bit
- Update the requirements to match the upstream recommendations
- Run the tests
- Really enable the python3
------------------------------------------------------------------- -------------------------------------------------------------------
Tue Dec 14 16:30:32 UTC 2017 - opensuse@dstoecker.de Tue Dec 14 16:30:32 UTC 2017 - opensuse@dstoecker.de

View File

@@ -17,29 +17,33 @@
%{?!python_module:%define python_module() python-%{**} python3-%{**}} %{?!python_module:%define python_module() python-%{**} python3-%{**}}
%define skip_python3 1
Name: python-xhtml2pdf Name: python-xhtml2pdf
Version: 0.2b Version: 0.2b
Release: 0 Release: 0
Summary: PDF Generator Using HTML and CSS Summary: PDF Generator Using HTML and CSS
License: Apache-2.0 License: Apache-2.0
Group: Development/Languages/Python Group: Development/Languages/Python
Url: https://github.com/xhtml2pdf/ Url: https://github.com/xhtml2pdf/xhtml2pdf
Source: http://pypi.python.org/packages/source/x/xhtml2pdf/xhtml2pdf-%{version}.tar.gz 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 # PATCH-FIX-OPENSUSE no_optimize.patch - Don't generate .pyo files during build
Patch0: no_optimize.patch Patch0: no_optimize.patch
BuildRequires: %{python_module nose} BuildRequires: %{python_module Pillow >= 2.0}
BuildRequires: %{python_module PyPDF2 >= 1.26}
BuildRequires: %{python_module html5lib >= 1.0b10}
BuildRequires: %{python_module httplib2 >= 0.7.6}
BuildRequires: %{python_module nose >= 1.3.3}
BuildRequires: %{python_module reportlab >= 3.0}
BuildRequires: %{python_module setuptools} BuildRequires: %{python_module setuptools}
BuildRequires: python-devel BuildRequires: %{python_module six}
BuildRequires: fdupes
BuildRequires: python-rpm-macros BuildRequires: python-rpm-macros
Requires: python-Pillow Requires: python-Pillow >= 2.0
Requires: python-PyPDF2 Requires: python-PyPDF2 >= 1.26
Requires: python-html5lib == 1.0b10 Requires: python-html5lib >= 1.0b10
Requires: python-httplib2 Requires: python-httplib2 >= 0.7.6
Requires: python-reportlab >= 3.0 Requires: python-reportlab >= 3.0
Requires: python-six Requires: python-six
Conflicts: python-pisa Conflicts: python-pisa
BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildArch: noarch BuildArch: noarch
%python_subpackages %python_subpackages
@@ -55,18 +59,27 @@ able to generate PDF templates very quickly without learning new technologies.
%prep %prep
%setup -q -n xhtml2pdf-%{version} %setup -q -n xhtml2pdf-%{version}
%patch0 -p1 %patch0 -p1
# sed out hardcoded html5lib require
sed -i \
-e 's:==1.0b10::g' \
setup.py
# remove turbogears module (broken)
rm -rf xhtml2pdf/turbogears.py
%build %build
%python_build %python_build
%install %install
%python_install %python_install
%python_expand %fdupes %{buildroot}%{$python_sitelib}
%check
%python_exec setup.py test
%files %python_files %files %python_files
%defattr(-,root,root,-)
%doc LICENSE.txt README.rst %doc LICENSE.txt README.rst
%{python_sitelib}/* %{python_sitelib}/*
%{_bindir}/pisa %python3_only %{_bindir}/pisa
%{_bindir}/xhtml2pdf %python3_only %{_bindir}/xhtml2pdf
%changelog %changelog