From 474cc9f637058b6b4688c53670115d86d5a89431 Mon Sep 17 00:00:00 2001 From: Petr Viktorin Date: Fri, 1 Sep 2017 13:49:50 +0200 Subject: [PATCH] install: Move renaming -devel scripts to the per-build function --- python3.spec | 34 +++++++++++++--------------------- 1 file changed, 13 insertions(+), 21 deletions(-) diff --git a/python3.spec b/python3.spec index b165216..e1ffc09 100644 --- a/python3.spec +++ b/python3.spec @@ -765,6 +765,7 @@ InstallPython() { ConfName=$1 PyInstSoName=$2 MoreCFlags=$3 + LDVersion=$4 # Switch to the directory with this configuration's built files ConfDir=build/$ConfName @@ -786,6 +787,14 @@ InstallPython() { cp Tools/gdb/libpython.py %{buildroot}$PathOfGdbPy %endif # with gdb_hooks + # Rename the -devel script that differs on different arches to arch specific name + mv %{buildroot}%{_bindir}/python${LDVersion}-{,`uname -m`-}config + echo -e '#!/bin/sh\nexec `dirname $0`/python'${LDVersion}'-`uname -m`-config "$@"' > \ + %{buildroot}%{_bindir}/python${LDVersion}-config + echo '[ $? -eq 127 ] && echo "Could not find python'${LDVersion}'-`uname -m`-config. Look around to see available arches." >&2' >> \ + %{buildroot}%{_bindir}/python${LDVersion}-config + chmod +x %{buildroot}%{_bindir}/python${LDVersion}-config + echo FINISHED: INSTALL OF PYTHON FOR CONFIGURATION: $ConfName } @@ -794,13 +803,15 @@ InstallPython() { %if %{with debug_build} InstallPython debug \ %{py_INSTSONAME_debug} \ - -O0 + -O0 \ + %{LDVERSION_debug} %endif # with debug_build # Now the optimized build: InstallPython optimized \ %{py_INSTSONAME_optimized} \ - "" + "" \ + %{LDVERSION_optimized} # Install directories for additional packages install -d -m 0755 %{buildroot}%{pylibdir}/site-packages/__pycache__ @@ -977,25 +988,6 @@ sed \ %endif # with systemtap -# Rename the -devel script that differs on different arches to arch specific name -mv %{buildroot}%{_bindir}/python%{LDVERSION_optimized}-{,`uname -m`-}config - -echo -e '#!/bin/sh\nexec `dirname $0`/python%{LDVERSION_optimized}-`uname -m`-config "$@"' > \ - %{buildroot}%{_bindir}/python%{LDVERSION_optimized}-config -echo '[ $? -eq 127 ] && echo "Could not find python%{LDVERSION_optimized}-`uname -m`-config. Look around to see available arches." >&2' >> \ - %{buildroot}%{_bindir}/python%{LDVERSION_optimized}-config - chmod +x %{buildroot}%{_bindir}/python%{LDVERSION_optimized}-config - -%if %{with debug_build} -# Rename the -debug script that differs on different arches to arch specific name -mv %{buildroot}%{_bindir}/python%{LDVERSION_debug}-{,`uname -m`-}config -echo -e '#!/bin/sh\nexec `dirname $0`/python%{LDVERSION_debug}-`uname -m`-config "$@"' > \ - %{buildroot}%{_bindir}/python%{LDVERSION_debug}-config -echo '[ $? -eq 127 ] && echo "Could not find python%{LDVERSION_debug}-`uname -m`-config. Look around to see available arches." >&2' >> \ - %{buildroot}%{_bindir}/python%{LDVERSION_debug}-config - chmod +x %{buildroot}%{_bindir}/python%{LDVERSION_debug}-config -%endif # with debug_build - # System Python: Link the executable to libexec # This is for backwards compatibility only and should be removed in Fedora 29 mkdir -p %{buildroot}%{_libexecdir}