diff options
author | Mikhail Kashkarov <m.kashkarov@partner.samsung.com> | 2019-05-27 13:19:51 +0300 |
---|---|---|
committer | Mikhail Kashkarov <m.kashkarov@partner.samsung.com> | 2019-09-05 13:50:59 +0300 |
commit | af6bf4fe69b67599c73ade5b9d120ee74625fa7c (patch) | |
tree | 1b67a31ff3b0e7246af69aeee8910e04886695c5 | |
parent | 2fc3403b56d1275dd8609bc694f00f241fa41108 (diff) | |
download | qemu-accel-af6bf4fe69b67599c73ade5b9d120ee74625fa7c.tar.gz qemu-accel-af6bf4fe69b67599c73ade5b9d120ee74625fa7c.tar.bz2 qemu-accel-af6bf4fe69b67599c73ade5b9d120ee74625fa7c.zip |
[4/7] Combine python${python_version} into single variable
${python_version} is not used without 'python' string.
Change-Id: Ia33c22f8746aeba8842147e68898f926e294dc39
-rw-r--r-- | packaging/qemu-accel-aarch64.spec | 54 | ||||
-rw-r--r-- | packaging/qemu-accel-armv7hl.spec | 54 | ||||
-rw-r--r-- | packaging/qemu-accel-armv7l.spec | 54 | ||||
-rw-r--r-- | packaging/qemu-accel.spec.in | 54 |
4 files changed, 108 insertions, 108 deletions
diff --git a/packaging/qemu-accel-aarch64.spec b/packaging/qemu-accel-aarch64.spec index b34c1e4..779b5a5 100644 --- a/packaging/qemu-accel-aarch64.spec +++ b/packaging/qemu-accel-aarch64.spec @@ -125,7 +125,7 @@ gcc_version=`gcc --version | sed -ne '1s/[^0-9]*\(\([0-9]\.\?\)*\).*/\1/p'` gcc_install_dir="$(%{target_arch}-gcc -print-file-name=)" # just like it is determided in python.spec -python_version=`python --version 2>&1 | sed -ne '1s/.* //p' | head -c 3` +host_python="python$(python --version 2>&1 | sed -ne '1s/.* //p' | head -c 3)" binaries="%{_libdir}/libnsl.so.1 %{_libdir}/libnss_compat.so.2" # loaded via dlopen by glibc %ifarch %ix86 @@ -207,9 +207,9 @@ prepare_package_list clang \ %{_bindir}/{clang-*,clang++,opt,lli,llc,llvm-*} prepare_package_list python \ - %{_bindir}/python${python_version} \ - %{_libdir}/python${python_version}/lib-dynload/*.so \ - %{_libdir}/python${python_version}/site-packages/*/*.so + %{_bindir}/${host_python} \ + %{_libdir}/${host_python}/lib-dynload/*.so \ + %{_libdir}/${host_python}/site-packages/*/*.so ## dump list of binaries and list of packages echo "### Binaries accelerated ###" @@ -328,47 +328,47 @@ for binary in ar as ld{,.bfd,.gold} nm obj{copy,dump} ranlib strip; do done # create symlinks for python -mv %{buildroot}%{our_path}%{_bindir}/python${python_version} %{buildroot}%{our_path}%{_bindir}/python${python_version}-orig -cat > %{buildroot}%{our_path}%{_bindir}/python${python_version} << EOF +mv %{buildroot}%{our_path}%{_bindir}/${host_python} %{buildroot}%{our_path}%{_bindir}/${host_python}-orig +cat > %{buildroot}%{our_path}%{_bindir}/${host_python} << EOF #!/bin/bash if [ -z "\$PYTHONPATH" ]; then - export PYTHONPATH="%{libdir}/python${python_version}" + export PYTHONPATH="%{libdir}/${host_python}" else - export PYTHONPATH+=":%{libdir}/python${python_version}" + export PYTHONPATH+=":%{libdir}/${host_python}" fi export PYTHONHOME="%{our_path}%{_prefix}" -%{our_path}%{_bindir}/python${python_version}-orig "\$@" +%{our_path}%{_bindir}/${host_python}-orig "\$@" EOF -chmod +x %{buildroot}%{our_path}%{_bindir}/python${python_version} +chmod +x %{buildroot}%{our_path}%{_bindir}/${host_python} -ln -s python${python_version} %{buildroot}%{our_path}%{_bindir}/python -ln -s python${python_version} %{buildroot}%{our_path}%{_libdir}/python +ln -s ${host_python} %{buildroot}%{our_path}%{_bindir}/python +ln -s ${host_python} %{buildroot}%{our_path}%{_libdir}/python #create symlinks for Scons -mkdir -p %{buildroot}%{our_path}%{libdir}/python${python_version}/site-packages -ln -sf %{libdir}/python${python_version}/site-packages/SCons %{buildroot}%{our_path}%{libdir}/python${python_version}/site-packages/SCons +mkdir -p %{buildroot}%{our_path}%{libdir}/${host_python}/site-packages +ln -sf %{libdir}/${host_python}/site-packages/SCons %{buildroot}%{our_path}%{libdir}/${host_python}/site-packages/SCons # rpmlint acceleration mkdir -p %{buildroot}%{our_path}/opt/testing/bin -ln -s %{our_path}%{_bindir}/python${python_version}-orig %{buildroot}%{our_path}/opt/testing/bin/ -cat > %{buildroot}%{our_path}/opt/testing/bin/python${python_version} << EOF +ln -s %{our_path}%{_bindir}/${host_python}-orig %{buildroot}%{our_path}/opt/testing/bin/ +cat > %{buildroot}%{our_path}/opt/testing/bin/${host_python} << EOF #!/bin/bash if [ -z "\$PYTHONPATH" ]; then - export PYTHONPATH="%{libdir}/python${python_version}" + export PYTHONPATH="%{libdir}/${host_python}" else - export PYTHONPATH+=":%{libdir}/python${python_version}" + export PYTHONPATH+=":%{libdir}/${host_python}" fi export PYTHONHOME="%{our_path}%{_prefix}" -%{our_path}/opt/testing/bin/python${python_version}-orig "\$@" +%{our_path}/opt/testing/bin/${host_python}-orig "\$@" EOF -chmod +x %{buildroot}%{our_path}/opt/testing/bin/python${python_version} -ln -s python${python_version} %{buildroot}%{our_path}/opt/testing/bin/python - -mkdir -p %{buildroot}%{our_path}%{_libdir}/python${python_version}/site-packages/rpm/ -mkdir -p %{buildroot}%{our_path}%{_libdir}/python${python_version}/encodings/ -cp %{_libdir}/python${python_version}/site-packages/rpm/*.py %{buildroot}%{our_path}%{_libdir}/python${python_version}/site-packages/rpm/ -cp %{_libdir}/python${python_version}/*.py %{buildroot}%{our_path}%{_libdir}/python${python_version}/ -cp %{_libdir}/python${python_version}/encodings/*.py %{buildroot}%{our_path}%{_libdir}/python${python_version}/encodings/ +chmod +x %{buildroot}%{our_path}/opt/testing/bin/${host_python} +ln -s ${host_python} %{buildroot}%{our_path}/opt/testing/bin/python + +mkdir -p %{buildroot}%{our_path}%{_libdir}/${host_python}/site-packages/rpm/ +mkdir -p %{buildroot}%{our_path}%{_libdir}/${host_python}/encodings/ +cp %{_libdir}/${host_python}/site-packages/rpm/*.py %{buildroot}%{our_path}%{_libdir}/${host_python}/site-packages/rpm/ +cp %{_libdir}/${host_python}/*.py %{buildroot}%{our_path}%{_libdir}/${host_python}/ +cp %{_libdir}/${host_python}/encodings/*.py %{buildroot}%{our_path}%{_libdir}/${host_python}/encodings/ find %{buildroot} -name 'python*' | sed -e 's|%{buildroot}%{our_path}||' | tee -a python.list # rename gcc binaries diff --git a/packaging/qemu-accel-armv7hl.spec b/packaging/qemu-accel-armv7hl.spec index d208d65..22d0300 100644 --- a/packaging/qemu-accel-armv7hl.spec +++ b/packaging/qemu-accel-armv7hl.spec @@ -125,7 +125,7 @@ gcc_version=`gcc --version | sed -ne '1s/[^0-9]*\(\([0-9]\.\?\)*\).*/\1/p'` gcc_install_dir="$(%{target_arch}-gcc -print-file-name=)" # just like it is determided in python.spec -python_version=`python --version 2>&1 | sed -ne '1s/.* //p' | head -c 3` +host_python="python$(python --version 2>&1 | sed -ne '1s/.* //p' | head -c 3)" binaries="%{_libdir}/libnsl.so.1 %{_libdir}/libnss_compat.so.2" # loaded via dlopen by glibc %ifarch %ix86 @@ -207,9 +207,9 @@ prepare_package_list clang \ %{_bindir}/{clang-*,clang++,opt,lli,llc,llvm-*} prepare_package_list python \ - %{_bindir}/python${python_version} \ - %{_libdir}/python${python_version}/lib-dynload/*.so \ - %{_libdir}/python${python_version}/site-packages/*/*.so + %{_bindir}/${host_python} \ + %{_libdir}/${host_python}/lib-dynload/*.so \ + %{_libdir}/${host_python}/site-packages/*/*.so ## dump list of binaries and list of packages echo "### Binaries accelerated ###" @@ -328,47 +328,47 @@ for binary in ar as ld{,.bfd,.gold} nm obj{copy,dump} ranlib strip; do done # create symlinks for python -mv %{buildroot}%{our_path}%{_bindir}/python${python_version} %{buildroot}%{our_path}%{_bindir}/python${python_version}-orig -cat > %{buildroot}%{our_path}%{_bindir}/python${python_version} << EOF +mv %{buildroot}%{our_path}%{_bindir}/${host_python} %{buildroot}%{our_path}%{_bindir}/${host_python}-orig +cat > %{buildroot}%{our_path}%{_bindir}/${host_python} << EOF #!/bin/bash if [ -z "\$PYTHONPATH" ]; then - export PYTHONPATH="%{libdir}/python${python_version}" + export PYTHONPATH="%{libdir}/${host_python}" else - export PYTHONPATH+=":%{libdir}/python${python_version}" + export PYTHONPATH+=":%{libdir}/${host_python}" fi export PYTHONHOME="%{our_path}%{_prefix}" -%{our_path}%{_bindir}/python${python_version}-orig "\$@" +%{our_path}%{_bindir}/${host_python}-orig "\$@" EOF -chmod +x %{buildroot}%{our_path}%{_bindir}/python${python_version} +chmod +x %{buildroot}%{our_path}%{_bindir}/${host_python} -ln -s python${python_version} %{buildroot}%{our_path}%{_bindir}/python -ln -s python${python_version} %{buildroot}%{our_path}%{_libdir}/python +ln -s ${host_python} %{buildroot}%{our_path}%{_bindir}/python +ln -s ${host_python} %{buildroot}%{our_path}%{_libdir}/python #create symlinks for Scons -mkdir -p %{buildroot}%{our_path}%{libdir}/python${python_version}/site-packages -ln -sf %{libdir}/python${python_version}/site-packages/SCons %{buildroot}%{our_path}%{libdir}/python${python_version}/site-packages/SCons +mkdir -p %{buildroot}%{our_path}%{libdir}/${host_python}/site-packages +ln -sf %{libdir}/${host_python}/site-packages/SCons %{buildroot}%{our_path}%{libdir}/${host_python}/site-packages/SCons # rpmlint acceleration mkdir -p %{buildroot}%{our_path}/opt/testing/bin -ln -s %{our_path}%{_bindir}/python${python_version}-orig %{buildroot}%{our_path}/opt/testing/bin/ -cat > %{buildroot}%{our_path}/opt/testing/bin/python${python_version} << EOF +ln -s %{our_path}%{_bindir}/${host_python}-orig %{buildroot}%{our_path}/opt/testing/bin/ +cat > %{buildroot}%{our_path}/opt/testing/bin/${host_python} << EOF #!/bin/bash if [ -z "\$PYTHONPATH" ]; then - export PYTHONPATH="%{libdir}/python${python_version}" + export PYTHONPATH="%{libdir}/${host_python}" else - export PYTHONPATH+=":%{libdir}/python${python_version}" + export PYTHONPATH+=":%{libdir}/${host_python}" fi export PYTHONHOME="%{our_path}%{_prefix}" -%{our_path}/opt/testing/bin/python${python_version}-orig "\$@" +%{our_path}/opt/testing/bin/${host_python}-orig "\$@" EOF -chmod +x %{buildroot}%{our_path}/opt/testing/bin/python${python_version} -ln -s python${python_version} %{buildroot}%{our_path}/opt/testing/bin/python - -mkdir -p %{buildroot}%{our_path}%{_libdir}/python${python_version}/site-packages/rpm/ -mkdir -p %{buildroot}%{our_path}%{_libdir}/python${python_version}/encodings/ -cp %{_libdir}/python${python_version}/site-packages/rpm/*.py %{buildroot}%{our_path}%{_libdir}/python${python_version}/site-packages/rpm/ -cp %{_libdir}/python${python_version}/*.py %{buildroot}%{our_path}%{_libdir}/python${python_version}/ -cp %{_libdir}/python${python_version}/encodings/*.py %{buildroot}%{our_path}%{_libdir}/python${python_version}/encodings/ +chmod +x %{buildroot}%{our_path}/opt/testing/bin/${host_python} +ln -s ${host_python} %{buildroot}%{our_path}/opt/testing/bin/python + +mkdir -p %{buildroot}%{our_path}%{_libdir}/${host_python}/site-packages/rpm/ +mkdir -p %{buildroot}%{our_path}%{_libdir}/${host_python}/encodings/ +cp %{_libdir}/${host_python}/site-packages/rpm/*.py %{buildroot}%{our_path}%{_libdir}/${host_python}/site-packages/rpm/ +cp %{_libdir}/${host_python}/*.py %{buildroot}%{our_path}%{_libdir}/${host_python}/ +cp %{_libdir}/${host_python}/encodings/*.py %{buildroot}%{our_path}%{_libdir}/${host_python}/encodings/ find %{buildroot} -name 'python*' | sed -e 's|%{buildroot}%{our_path}||' | tee -a python.list # rename gcc binaries diff --git a/packaging/qemu-accel-armv7l.spec b/packaging/qemu-accel-armv7l.spec index 6ae8638..a02abd9 100644 --- a/packaging/qemu-accel-armv7l.spec +++ b/packaging/qemu-accel-armv7l.spec @@ -125,7 +125,7 @@ gcc_version=`gcc --version | sed -ne '1s/[^0-9]*\(\([0-9]\.\?\)*\).*/\1/p'` gcc_install_dir="$(%{target_arch}-gcc -print-file-name=)" # just like it is determided in python.spec -python_version=`python --version 2>&1 | sed -ne '1s/.* //p' | head -c 3` +host_python="python$(python --version 2>&1 | sed -ne '1s/.* //p' | head -c 3)" binaries="%{_libdir}/libnsl.so.1 %{_libdir}/libnss_compat.so.2" # loaded via dlopen by glibc %ifarch %ix86 @@ -207,9 +207,9 @@ prepare_package_list clang \ %{_bindir}/{clang-*,clang++,opt,lli,llc,llvm-*} prepare_package_list python \ - %{_bindir}/python${python_version} \ - %{_libdir}/python${python_version}/lib-dynload/*.so \ - %{_libdir}/python${python_version}/site-packages/*/*.so + %{_bindir}/${host_python} \ + %{_libdir}/${host_python}/lib-dynload/*.so \ + %{_libdir}/${host_python}/site-packages/*/*.so ## dump list of binaries and list of packages echo "### Binaries accelerated ###" @@ -328,47 +328,47 @@ for binary in ar as ld{,.bfd,.gold} nm obj{copy,dump} ranlib strip; do done # create symlinks for python -mv %{buildroot}%{our_path}%{_bindir}/python${python_version} %{buildroot}%{our_path}%{_bindir}/python${python_version}-orig -cat > %{buildroot}%{our_path}%{_bindir}/python${python_version} << EOF +mv %{buildroot}%{our_path}%{_bindir}/${host_python} %{buildroot}%{our_path}%{_bindir}/${host_python}-orig +cat > %{buildroot}%{our_path}%{_bindir}/${host_python} << EOF #!/bin/bash if [ -z "\$PYTHONPATH" ]; then - export PYTHONPATH="%{libdir}/python${python_version}" + export PYTHONPATH="%{libdir}/${host_python}" else - export PYTHONPATH+=":%{libdir}/python${python_version}" + export PYTHONPATH+=":%{libdir}/${host_python}" fi export PYTHONHOME="%{our_path}%{_prefix}" -%{our_path}%{_bindir}/python${python_version}-orig "\$@" +%{our_path}%{_bindir}/${host_python}-orig "\$@" EOF -chmod +x %{buildroot}%{our_path}%{_bindir}/python${python_version} +chmod +x %{buildroot}%{our_path}%{_bindir}/${host_python} -ln -s python${python_version} %{buildroot}%{our_path}%{_bindir}/python -ln -s python${python_version} %{buildroot}%{our_path}%{_libdir}/python +ln -s ${host_python} %{buildroot}%{our_path}%{_bindir}/python +ln -s ${host_python} %{buildroot}%{our_path}%{_libdir}/python #create symlinks for Scons -mkdir -p %{buildroot}%{our_path}%{libdir}/python${python_version}/site-packages -ln -sf %{libdir}/python${python_version}/site-packages/SCons %{buildroot}%{our_path}%{libdir}/python${python_version}/site-packages/SCons +mkdir -p %{buildroot}%{our_path}%{libdir}/${host_python}/site-packages +ln -sf %{libdir}/${host_python}/site-packages/SCons %{buildroot}%{our_path}%{libdir}/${host_python}/site-packages/SCons # rpmlint acceleration mkdir -p %{buildroot}%{our_path}/opt/testing/bin -ln -s %{our_path}%{_bindir}/python${python_version}-orig %{buildroot}%{our_path}/opt/testing/bin/ -cat > %{buildroot}%{our_path}/opt/testing/bin/python${python_version} << EOF +ln -s %{our_path}%{_bindir}/${host_python}-orig %{buildroot}%{our_path}/opt/testing/bin/ +cat > %{buildroot}%{our_path}/opt/testing/bin/${host_python} << EOF #!/bin/bash if [ -z "\$PYTHONPATH" ]; then - export PYTHONPATH="%{libdir}/python${python_version}" + export PYTHONPATH="%{libdir}/${host_python}" else - export PYTHONPATH+=":%{libdir}/python${python_version}" + export PYTHONPATH+=":%{libdir}/${host_python}" fi export PYTHONHOME="%{our_path}%{_prefix}" -%{our_path}/opt/testing/bin/python${python_version}-orig "\$@" +%{our_path}/opt/testing/bin/${host_python}-orig "\$@" EOF -chmod +x %{buildroot}%{our_path}/opt/testing/bin/python${python_version} -ln -s python${python_version} %{buildroot}%{our_path}/opt/testing/bin/python - -mkdir -p %{buildroot}%{our_path}%{_libdir}/python${python_version}/site-packages/rpm/ -mkdir -p %{buildroot}%{our_path}%{_libdir}/python${python_version}/encodings/ -cp %{_libdir}/python${python_version}/site-packages/rpm/*.py %{buildroot}%{our_path}%{_libdir}/python${python_version}/site-packages/rpm/ -cp %{_libdir}/python${python_version}/*.py %{buildroot}%{our_path}%{_libdir}/python${python_version}/ -cp %{_libdir}/python${python_version}/encodings/*.py %{buildroot}%{our_path}%{_libdir}/python${python_version}/encodings/ +chmod +x %{buildroot}%{our_path}/opt/testing/bin/${host_python} +ln -s ${host_python} %{buildroot}%{our_path}/opt/testing/bin/python + +mkdir -p %{buildroot}%{our_path}%{_libdir}/${host_python}/site-packages/rpm/ +mkdir -p %{buildroot}%{our_path}%{_libdir}/${host_python}/encodings/ +cp %{_libdir}/${host_python}/site-packages/rpm/*.py %{buildroot}%{our_path}%{_libdir}/${host_python}/site-packages/rpm/ +cp %{_libdir}/${host_python}/*.py %{buildroot}%{our_path}%{_libdir}/${host_python}/ +cp %{_libdir}/${host_python}/encodings/*.py %{buildroot}%{our_path}%{_libdir}/${host_python}/encodings/ find %{buildroot} -name 'python*' | sed -e 's|%{buildroot}%{our_path}||' | tee -a python.list # rename gcc binaries diff --git a/packaging/qemu-accel.spec.in b/packaging/qemu-accel.spec.in index 4389bff..26b0b63 100644 --- a/packaging/qemu-accel.spec.in +++ b/packaging/qemu-accel.spec.in @@ -122,7 +122,7 @@ gcc_version=`gcc --version | sed -ne '1s/[^0-9]*\(\([0-9]\.\?\)*\).*/\1/p'` gcc_install_dir="$(%{target_arch}-gcc -print-file-name=)" # just like it is determided in python.spec -python_version=`python --version 2>&1 | sed -ne '1s/.* //p' | head -c 3` +host_python="python$(python --version 2>&1 | sed -ne '1s/.* //p' | head -c 3)" binaries="%{_libdir}/libnsl.so.1 %{_libdir}/libnss_compat.so.2" # loaded via dlopen by glibc %ifarch %ix86 @@ -204,9 +204,9 @@ prepare_package_list clang \ %{_bindir}/{clang-*,clang++,opt,lli,llc,llvm-*} prepare_package_list python \ - %{_bindir}/python${python_version} \ - %{_libdir}/python${python_version}/lib-dynload/*.so \ - %{_libdir}/python${python_version}/site-packages/*/*.so + %{_bindir}/${host_python} \ + %{_libdir}/${host_python}/lib-dynload/*.so \ + %{_libdir}/${host_python}/site-packages/*/*.so ## dump list of binaries and list of packages echo "### Binaries accelerated ###" @@ -325,47 +325,47 @@ for binary in ar as ld{,.bfd,.gold} nm obj{copy,dump} ranlib strip; do done # create symlinks for python -mv %{buildroot}%{our_path}%{_bindir}/python${python_version} %{buildroot}%{our_path}%{_bindir}/python${python_version}-orig -cat > %{buildroot}%{our_path}%{_bindir}/python${python_version} << EOF +mv %{buildroot}%{our_path}%{_bindir}/${host_python} %{buildroot}%{our_path}%{_bindir}/${host_python}-orig +cat > %{buildroot}%{our_path}%{_bindir}/${host_python} << EOF #!/bin/bash if [ -z "\$PYTHONPATH" ]; then - export PYTHONPATH="%{libdir}/python${python_version}" + export PYTHONPATH="%{libdir}/${host_python}" else - export PYTHONPATH+=":%{libdir}/python${python_version}" + export PYTHONPATH+=":%{libdir}/${host_python}" fi export PYTHONHOME="%{our_path}%{_prefix}" -%{our_path}%{_bindir}/python${python_version}-orig "\$@" +%{our_path}%{_bindir}/${host_python}-orig "\$@" EOF -chmod +x %{buildroot}%{our_path}%{_bindir}/python${python_version} +chmod +x %{buildroot}%{our_path}%{_bindir}/${host_python} -ln -s python${python_version} %{buildroot}%{our_path}%{_bindir}/python -ln -s python${python_version} %{buildroot}%{our_path}%{_libdir}/python +ln -s ${host_python} %{buildroot}%{our_path}%{_bindir}/python +ln -s ${host_python} %{buildroot}%{our_path}%{_libdir}/python #create symlinks for Scons -mkdir -p %{buildroot}%{our_path}%{libdir}/python${python_version}/site-packages -ln -sf %{libdir}/python${python_version}/site-packages/SCons %{buildroot}%{our_path}%{libdir}/python${python_version}/site-packages/SCons +mkdir -p %{buildroot}%{our_path}%{libdir}/${host_python}/site-packages +ln -sf %{libdir}/${host_python}/site-packages/SCons %{buildroot}%{our_path}%{libdir}/${host_python}/site-packages/SCons # rpmlint acceleration mkdir -p %{buildroot}%{our_path}/opt/testing/bin -ln -s %{our_path}%{_bindir}/python${python_version}-orig %{buildroot}%{our_path}/opt/testing/bin/ -cat > %{buildroot}%{our_path}/opt/testing/bin/python${python_version} << EOF +ln -s %{our_path}%{_bindir}/${host_python}-orig %{buildroot}%{our_path}/opt/testing/bin/ +cat > %{buildroot}%{our_path}/opt/testing/bin/${host_python} << EOF #!/bin/bash if [ -z "\$PYTHONPATH" ]; then - export PYTHONPATH="%{libdir}/python${python_version}" + export PYTHONPATH="%{libdir}/${host_python}" else - export PYTHONPATH+=":%{libdir}/python${python_version}" + export PYTHONPATH+=":%{libdir}/${host_python}" fi export PYTHONHOME="%{our_path}%{_prefix}" -%{our_path}/opt/testing/bin/python${python_version}-orig "\$@" +%{our_path}/opt/testing/bin/${host_python}-orig "\$@" EOF -chmod +x %{buildroot}%{our_path}/opt/testing/bin/python${python_version} -ln -s python${python_version} %{buildroot}%{our_path}/opt/testing/bin/python - -mkdir -p %{buildroot}%{our_path}%{_libdir}/python${python_version}/site-packages/rpm/ -mkdir -p %{buildroot}%{our_path}%{_libdir}/python${python_version}/encodings/ -cp %{_libdir}/python${python_version}/site-packages/rpm/*.py %{buildroot}%{our_path}%{_libdir}/python${python_version}/site-packages/rpm/ -cp %{_libdir}/python${python_version}/*.py %{buildroot}%{our_path}%{_libdir}/python${python_version}/ -cp %{_libdir}/python${python_version}/encodings/*.py %{buildroot}%{our_path}%{_libdir}/python${python_version}/encodings/ +chmod +x %{buildroot}%{our_path}/opt/testing/bin/${host_python} +ln -s ${host_python} %{buildroot}%{our_path}/opt/testing/bin/python + +mkdir -p %{buildroot}%{our_path}%{_libdir}/${host_python}/site-packages/rpm/ +mkdir -p %{buildroot}%{our_path}%{_libdir}/${host_python}/encodings/ +cp %{_libdir}/${host_python}/site-packages/rpm/*.py %{buildroot}%{our_path}%{_libdir}/${host_python}/site-packages/rpm/ +cp %{_libdir}/${host_python}/*.py %{buildroot}%{our_path}%{_libdir}/${host_python}/ +cp %{_libdir}/${host_python}/encodings/*.py %{buildroot}%{our_path}%{_libdir}/${host_python}/encodings/ find %{buildroot} -name 'python*' | sed -e 's|%{buildroot}%{our_path}||' | tee -a python.list # rename gcc binaries |