From 3d331e0e4db4adfa11efdcaf8d860b3cde6e1b60 Mon Sep 17 00:00:00 2001 From: Lukas Slebodnik Date: May 25 2018 08:17:24 +0000 Subject: CI: Prepare for python3 -> python rpm-spec-builddeps is usde for extracting build dependencies from spec file to avoid duplication. But it was mostly used by python2 and therefore we did not notice issues with python3 which has "print" as a function and not as a statement. Merges: https://pagure.io/SSSD/sssd/pull-request/3698 --- diff --git a/contrib/ci/rpm-spec-builddeps b/contrib/ci/rpm-spec-builddeps index b73ed20..e1bb2b0 100755 --- a/contrib/ci/rpm-spec-builddeps +++ b/contrib/ci/rpm-spec-builddeps @@ -17,10 +17,13 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see . +from __future__ import print_function + import sys import re import rpm + def usage(file): file.write(("Usage: %s SPEC\n" + "Extract build dependencies from an RPM .spec file.\n") % @@ -32,4 +35,4 @@ if len(sys.argv) != 2: spec = rpm.spec(sys.argv[1]) for d in rpm.ds(spec.sourceHeader, 'requires'): - print d.DNEVR()[2:] + print(d.DNEVR()[2:])