From 63175d4d31469816c575ddb4de9698fb5c053536 Mon Sep 17 00:00:00 2001 From: Panu Matilainen Date: Mon, 19 Oct 2009 10:30:48 +0300 Subject: =?UTF-8?q?Avoid=20using=20python's=20print=20for=20Python=203.x?= =?UTF-8?q?=20compatibility=20-=20print=20chanced=20from=20statement=20to?= =?UTF-8?q?=20a=20function=20in=20python=203,=20for=20our=20=20=20purposes?= =?UTF-8?q?=20sys.stdout.write()=20is=20sufficient=20and=20avoids=20dealin?= =?UTF-8?q?g=20with=20=20=20the=20incompatibilities=20between=20Python=202?= =?UTF-8?q?.x=20and=203.x=20-=20suggested=20by=20David=20Malcolm=20/=20Vil?= =?UTF-8?q?le=20Skytt=C3=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- scripts/macros.python.in | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'scripts') diff --git a/scripts/macros.python.in b/scripts/macros.python.in index c7832a67a..ea1f200fc 100644 --- a/scripts/macros.python.in +++ b/scripts/macros.python.in @@ -3,10 +3,10 @@ # %include %{_rpmconfigdir}/macros.python # python main version -%define py_ver %(echo `python -c "import sys; print sys.version[:3]"`) +%define py_ver %(echo `python -c "import sys; sys.stdout.write(sys.version[:3])"`) # directories -%define py_prefix %(echo `python -c "import sys; print sys.prefix"`) +%define py_prefix %(echo `python -c "import sys; sys.stdout.write(sys.prefix)"`) %define py_libdir %{py_prefix}/lib/python%{py_ver} %define py_incdir /usr/include/python%{py_ver} %define py_sitedir %{py_libdir}/site-packages -- cgit v1.2.3