[python26-m2crypto/el5/master: 77/78] Use %__python macro for python calls and locations
gholms
gholms at fedoraproject.org
Wed Feb 23 00:31:56 UTC 2011
commit 2664173aeff68eb0b724ad6b0dbad5e85e549bb8
Author: Garrett Holmstrom <gholms at fedoraproject.org>
Date: Tue Feb 22 15:50:34 2011 -0800
Use %__python macro for python calls and locations
m2crypto.spec | 9 ++++-----
1 files changed, 4 insertions(+), 5 deletions(-)
---
diff --git a/m2crypto.spec b/m2crypto.spec
index f8803f8..d6700e9 100644
--- a/m2crypto.spec
+++ b/m2crypto.spec
@@ -66,7 +66,7 @@ if pkg-config openssl ; then
fi
# -cpperraswarn is necessary for including opensslconf-${basearch} directly
-SWIG_FEATURES=-cpperraswarn python setup.py build
+SWIG_FEATURES=-cpperraswarn %{__python} setup.py build
%install
CFLAGS="$RPM_OPT_FLAGS" ; export CFLAGS
@@ -75,10 +75,10 @@ if pkg-config openssl ; then
LDFLAGS="$LDFLAGS`pkg-config --libs-only-L openssl`" ; export LDFLAGS
fi
-python setup.py install --root=$RPM_BUILD_ROOT
+%{__python} setup.py install --root=$RPM_BUILD_ROOT
for i in medusa medusa054; do
- sed -i -e '1s,#! /usr/local/bin/python,#! /usr/bin/python,' \
+ sed -i -e '1s,#! /usr/local/bin/python,#! %{__python},' \
demo/$i/http_server.py
done
@@ -87,9 +87,8 @@ rm demo/Zope/starts.bat
# Fix up documentation permissions
find demo tests -type f -perm -111 -print0 | xargs -0 chmod a-x
-python_path=$(which python)
grep -rl '/usr/bin/env python' demo tests \
- | xargs sed -i "s,/usr/bin/env python,${python_path},"
+ | xargs sed -i "s,/usr/bin/env python,%{__python},"
rm tests/*.py.* # Patch backup files
More information about the scm-commits
mailing list