Hello community, here is the log from the commit of package kraft for openSUSE:Factory checked in at 2020-05-07 14:56:37 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/kraft (Old) and /work/SRC/openSUSE:Factory/.kraft.new.2738 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "kraft" Thu May 7 14:56:37 2020 rev:12 rq:800992 version:0.90 Changes: -------- --- /work/SRC/openSUSE:Factory/kraft/kraft.changes 2019-12-16 15:19:23.371163627 +0100 +++ /work/SRC/openSUSE:Factory/.kraft.new.2738/kraft.changes 2020-05-07 14:56:42.482532300 +0200 @@ -1,0 +2,8 @@ +Thu May 7 06:46:03 UTC 2020 - Wolfgang Bauer <wba...@tmo.at> + +- Add upstream patches to port to Python 3: + * Check-only-for-Python-3-for-erml2pdf.py.patch + * Switch-erml2pdf.py-to-Python-3.patch +- Switch python2 package requirements to python3 + +------------------------------------------------------------------- New: ---- Check-only-for-Python-3-for-erml2pdf.py.patch Switch-erml2pdf.py-to-Python-3.patch ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ kraft.spec ++++++ --- /var/tmp/diff_new_pack.rcs3cu/_old 2020-05-07 14:56:43.074533368 +0200 +++ /var/tmp/diff_new_pack.rcs3cu/_new 2020-05-07 14:56:43.078533375 +0200 @@ -1,7 +1,7 @@ # # spec file for package kraft # -# Copyright (c) 2019 SUSE LLC +# Copyright (c) 2020 SUSE LLC # Copyright (c) 2007-2011 Klaas Freitag <frei...@kde.org> # # All modifications and additions to the file contributed by third parties @@ -26,7 +26,7 @@ License: GPL-2.0-or-later AND LGPL-2.1-or-later Group: Productivity/Office/Other -%bcond_with akonadi +%bcond_without akonadi %bcond_with qpdfview @@ -35,13 +35,16 @@ # PATCH-FEATURE-UPSTREAM use_qpdfview.path Open PDFs in qpdfview in appimages Patch0: use_qpdfview.patch %endif +# PATCH-FIX-UPSTREAM +Patch1: Check-only-for-Python-3-for-erml2pdf.py.patch +# PATCH-FIX-UPSTREAM +Patch2: Switch-erml2pdf.py-to-Python-3.patch -# Continue to use python2 for now. BuildRoot: %{_tmppath}/%{name}-%{version}-build -Requires: python2-PyPDF2 -Requires: python2-reportlab -Requires: python2-six -Requires: python2-xml +Requires: python3-base +Requires: python3-PyPDF2 +Requires: python3-reportlab +Requires: python3-six %if %{with akonadi} BuildRequires: akonadi-contact-devel @@ -76,6 +79,8 @@ %if %{with qpdfview} %patch0 -p1 %endif +%patch1 -p1 +%patch2 -p1 %build ++++++ Check-only-for-Python-3-for-erml2pdf.py.patch ++++++ >From 7eff90f462c740b527a1484e31383ea707351180 Mon Sep 17 00:00:00 2001 From: Pino Toscano <toscano.p...@tiscali.it> Date: Mon, 30 Dec 2019 08:24:25 +0100 Subject: [PATCH] Check for only for Python 3 for erml2pdf.py Python 3 has been around for many years, and even not so recent distros ship it. Considering Python 2 is EOL since 2020, switch the search for the Python interpreter for erml2pdf.py to Python 3 only. --- src/reportgenerator.cpp | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/src/reportgenerator.cpp b/src/reportgenerator.cpp index 4547319..6ca4dcc 100644 --- a/src/reportgenerator.cpp +++ b/src/reportgenerator.cpp @@ -484,7 +484,7 @@ QStringList ReportGenerator::findTrml2Pdf( ) p += QLatin1String("/tools/erml2pdf.py"); // qDebug () << "Found erml2pdf from KRAFT_HOME: " << p; if( QFile::exists( p ) ) { - retList << "python"; + retList << "python3"; retList << p; mHavePdfMerge = true; } @@ -492,14 +492,10 @@ QStringList ReportGenerator::findTrml2Pdf( ) const QString ermlpy = QStandardPaths::locate(QStandardPaths::GenericDataLocation, "kraft/tools/erml2pdf.py" ); // qDebug () << "Ermlpy: " << ermlpy; if( ! ermlpy.isEmpty() ) { - // need the python interpreter - // First check for python2 in python3 times. - QString python = QStandardPaths::findExecutable(QLatin1String("python2")); + // need the python3 interpreter, check for it + QString python = QStandardPaths::findExecutable(QLatin1String("python3")); if( python.isEmpty() ) { - python = QStandardPaths::findExecutable(QLatin1String("python")); - } - if( python.isEmpty() ) { - qCritical() << "ERR: Unable to find python, thats a problem"; + qCritical() << "ERR: Unable to find python3, thats a problem"; } else { // qDebug () << "Using python: " << python; retList << python; @@ -543,7 +539,7 @@ void ReportGenerator::runTrml2Pdf( const QString& rmlFile, const QString& docID, { mErrors.clear(); // findTrml2Pdf returns a list of command line parts for the converter, such as - // /usr/bin/pyhton /usr/local/share/erml2pdf.py + // /usr/bin/pyhton3 /usr/local/share/erml2pdf.py QStringList rmlbin = findTrml2Pdf(); if ( ! rmlbin.size() ) { ++++++ Switch-erml2pdf.py-to-Python-3.patch ++++++ >From ec454967c723eec599a03b6747eb5f4209360f31 Mon Sep 17 00:00:00 2001 From: Pino Toscano <toscano.p...@tiscali.it> Date: Mon, 30 Dec 2019 08:32:30 +0100 Subject: [PATCH] Switch erml2pdf.py to Python 3 Even if kraft runs it with an explicit Python interpreter, switch its shebang to Python 3 to make sure it will be also when run as standalone executable. --- tools/erml2pdf.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/erml2pdf.py b/tools/erml2pdf.py index f5f4ea0..9f35c2d 100644 --- a/tools/erml2pdf.py +++ b/tools/erml2pdf.py @@ -1,4 +1,4 @@ -#!/usr/bin/python +#!/usr/bin/python3 # -*- coding: utf-8 -*- # # erml2pdf - An RML to PDF converter with extended features