jcapik pushed to findutils (f22). "make the test-suite ready for Python 3"

notifications at fedoraproject.org notifications at fedoraproject.org
Thu Jun 11 13:32:37 UTC 2015


From 3c9d6c2bf3464e5140d486d37e41162300912c43 Mon Sep 17 00:00:00 2001
From: Kamil Dudka <kdudka at redhat.com>
Date: Wed, 18 Mar 2015 17:10:12 +0100
Subject: make the test-suite ready for Python 3


diff --git a/findutils-4.5.14-python3.patch b/findutils-4.5.14-python3.patch
new file mode 100644
index 0000000..a9cce55
--- /dev/null
+++ b/findutils-4.5.14-python3.patch
@@ -0,0 +1,33 @@
+From 16bc7d519ed81bc9427a4e28dd74b45e1595f960 Mon Sep 17 00:00:00 2001
+From: James Youngman <jay at gnu.org>
+Date: Tue, 19 Aug 2014 08:29:49 +0100
+Subject: [PATCH] Fix bug #42903: the print statement doesn't exist in Python
+ 3.
+
+* find/testsuite/checklists.py (main): Avoid using the print
+statement as it is not compatible with Python 3.  We use
+sys.stdout.write, since our needs here are simple.
+
+Upstream-commit: d56af2e2d5902c5f8a1ef99073d925c7d3b253d2
+Signed-off-by: Kamil Dudka <kdudka at redhat.com>
+---
+ find/testsuite/checklists.py | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/find/testsuite/checklists.py b/find/testsuite/checklists.py
+index 2a2fd10..63c9c16 100644
+--- a/find/testsuite/checklists.py
++++ b/find/testsuite/checklists.py
+@@ -77,7 +77,8 @@ def main(args):
+     dupes, configured = configured_file_names(args[1])
+     with TemporaryWorkingDirectory(args[2]):
+         actual = set(find_test_files(args[3:]))
+-    print '%d test files configured for find, %s files on-disk' % (len(configured), len(actual))
++    sys.stdout.write('%d test files configured for find, %s files on-disk'
++                     % (len(configured), len(actual)))
+     problem_count = 0
+     problem_count += report_problems(dupes, report_dupe)
+     problem_count += report_problems(configured - actual, report_missing)
+-- 
+2.1.0
+
diff --git a/findutils.spec b/findutils.spec
index d81a108..139f6bf 100644
--- a/findutils.spec
+++ b/findutils.spec
@@ -1,7 +1,7 @@
 Summary: The GNU versions of find utilities (find and xargs)
 Name: findutils
 Version: 4.5.14
-Release: 4%{?dist}
+Release: 5%{?dist}
 Epoch: 1
 License: GPLv3+
 Group: Applications/File
@@ -24,6 +24,9 @@ Patch4: findutils-4.5.13-warnings.patch
 # eliminate failure of gnulib tests on little-endian PowerPC (#1083145)
 Patch5: findutils-4.5.12-ppc-gnulib-tests.patch
 
+# make the test-suite ready for Python 3
+Patch6: findutils-4.5.14-python3.patch
+
 Requires(post): /sbin/install-info
 Requires(preun): /sbin/install-info
 Conflicts: filesystem < 3
@@ -55,6 +58,7 @@ rm -rf locate
 %patch3 -p1
 %patch4 -p1
 %patch5 -p1
+%patch6 -p1
 
 # needed because of findutils-4.4.0-no-locate.patch
 autoreconf -iv
@@ -103,6 +107,9 @@ fi
 %{_infodir}/find-maint.info.gz
 
 %changelog
+* Wed Mar 18 2015 Kamil Dudka <kdudka at redhat.com> - 1:4.5.14-5
+- make the test-suite ready for Python 3
+
 * Sat Feb 21 2015 Till Maas <opensource at till.name> - 1:4.5.14-4
 - Rebuilt for Fedora 23 Change
   https://fedoraproject.org/wiki/Changes/Harden_all_packages_with_position-independent_code
-- 
cgit v0.10.2


	http://pkgs.fedoraproject.org/cgit/findutils.git/commit/?h=f22&id=3c9d6c2bf3464e5140d486d37e41162300912c43


More information about the scm-commits mailing list