From fb6e196689346652697dca237d994c3332cfd3f8963c55d0122e59b8b4cb2a68 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Chv=C3=A1tal?= Date: Fri, 15 May 2020 17:38:45 +0000 Subject: [PATCH] Accepting request 805849 from home:pgajdos:python submit OBS-URL: https://build.opensuse.org/request/show/805849 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-xhtml2pdf?expand=0&rev=15 --- python-xhtml2pdf.changes | 5 +++++ python-xhtml2pdf.spec | 16 ++++++++++++++-- 2 files changed, 19 insertions(+), 2 deletions(-) diff --git a/python-xhtml2pdf.changes b/python-xhtml2pdf.changes index 8191448..b87d90d 100644 --- a/python-xhtml2pdf.changes +++ b/python-xhtml2pdf.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Fri May 15 12:56:36 UTC 2020 - Petr Gajdos + +- %python3_only -> %python_alternative + ------------------------------------------------------------------- Thu Feb 6 12:19:52 UTC 2020 - Marketa Calabkova diff --git a/python-xhtml2pdf.spec b/python-xhtml2pdf.spec index 551c46c..0b8c71b 100644 --- a/python-xhtml2pdf.spec +++ b/python-xhtml2pdf.spec @@ -41,6 +41,8 @@ Requires: python-PyPDF2 >= 1.26 Requires: python-html5lib >= 1.0 Requires: python-reportlab >= 3.0 Requires: python-six +Requires(post): update-alternatives +Requires(postun): update-alternatives Conflicts: python-pisa BuildArch: noarch %python_subpackages @@ -61,16 +63,26 @@ able to generate PDF templates very quickly without learning new technologies. %install %python_install +%python_clone -a %{buildroot}%{_bindir}/xhtml2pdf +%python_clone -a %{buildroot}%{_bindir}/pisa %python_expand %fdupes %{buildroot}%{$python_sitelib} %check # as in setup.py: test_suite = "tests", They're not even working yet +%post +%python_install_alternative xhtml2pdf +%python_install_alternative pisa + +%postun +%python_uninstall_alternative xhtml2pdf +%python_uninstall_alternative pisa + %files %{python_files} %license LICENSE.txt %doc README.rst %{python_sitelib}/* -%python3_only %{_bindir}/pisa -%python3_only %{_bindir}/xhtml2pdf +%python_alternative %{_bindir}/pisa +%python_alternative %{_bindir}/xhtml2pdf %changelog