summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--configure.ac2
-rw-r--r--macros.in6
-rw-r--r--scripts/macros.python.in4
3 files changed, 6 insertions, 6 deletions
diff --git a/configure.ac b/configure.ac
index f9d6cabd5..483316904 100644
--- a/configure.ac
+++ b/configure.ac
@@ -673,7 +673,7 @@ AS_IF([test "$enable_python" = yes],[
# rpm-python is based on python-2.5,
# with legacy hacks to allow building against python >= 2.3
AM_PATH_PYTHON([2.3],[
- WITH_PYTHON_INCLUDE=`${PYTHON} -c 'from distutils.sysconfig import *; print get_python_inc()'`
+ WITH_PYTHON_INCLUDE=`${PYTHON} -c 'from distutils.sysconfig import *; import sys; sys.stdout.write(get_python_inc())'`
WITH_PYTHON_SUBPACKAGE=1
save_CPPFLAGS="$CPPFLAGS"
CPPFLAGS="$CPPFLAGS -I$WITH_PYTHON_INCLUDE"
diff --git a/macros.in b/macros.in
index da3903278..75949a400 100644
--- a/macros.in
+++ b/macros.in
@@ -1150,9 +1150,9 @@ done \
#------------------------------------------------------------------------------
# Useful python macros for determining python version and paths
#
-%python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")
-%python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)")
-%python_version %(%{__python} -c "import sys; print sys.version[:3]")
+%python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; import sys; sys.stdout.write(get_python_lib())")
+%python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; import sys; sys.stdout.write(get_python_lib(1))")
+%python_version %(%{__python} -c "import sys; sys.stdout.write(sys.version[:3])")
#------------------------------------------------------------------------------
# arch macro for all Intel i?86 compatibile processors
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