diff options
author | Yury Usishchev <y.usishchev@samsung.com> | 2015-11-05 13:37:38 +0300 |
---|---|---|
committer | Yury Usishchev <y.usishchev@samsung.com> | 2015-11-12 14:15:59 +0300 |
commit | 68f6cbfb59adc039b79916b768ddf6de54f2ace6 (patch) | |
tree | 0773ef950b88e863e1b397ba33c68beee635c85b | |
parent | 0e16a9fa681db246e9a855bdfce96facf74b5d5c (diff) | |
download | qemu-accel-68f6cbfb59adc039b79916b768ddf6de54f2ace6.tar.gz qemu-accel-68f6cbfb59adc039b79916b768ddf6de54f2ace6.tar.bz2 qemu-accel-68f6cbfb59adc039b79916b768ddf6de54f2ace6.zip |
accelerate python from rpmlint-mini
-rw-r--r-- | packaging/qemu-accel-aarch64.spec | 28 | ||||
-rw-r--r-- | packaging/qemu-accel-armv7l.spec | 28 | ||||
-rw-r--r-- | packaging/qemu-accel.spec | 28 |
3 files changed, 78 insertions, 6 deletions
diff --git a/packaging/qemu-accel-aarch64.spec b/packaging/qemu-accel-aarch64.spec index 381d508..81f064d 100644 --- a/packaging/qemu-accel-aarch64.spec +++ b/packaging/qemu-accel-aarch64.spec @@ -51,6 +51,8 @@ BuildRequires: gawk BuildRequires: libstdc++ BuildRequires: python BuildRequires: python-xml +BuildRequires: python-magic +BuildRequires: python-rpm Summary: Native binaries for speeding up cross compile License: GPL-2.0 Group: Development/Cross Compilation @@ -110,6 +112,7 @@ for executable in $LD \ %{_bindir}/xsltproc \ %{_bindir}/python${python_version} \ %{_libdir}/python${python_version}/lib-dynload/*.so \ + %{_libdir}/python${python_version}/site-packages/*/*.so \ %{_bindir}/{ccmake,cmake,cpack,ctest} \ %{_bindir}/%{target_arch}-{addr2line,ar,as,c++filt,dwp,elfedit,gprof,ld,ld.bfd,ld.gold,nm,objcopy,objdump,ranlib,readelf,size,strings,strip} \ %{_bindir}/%{target_arch}-{c++,g++,cpp,gcc,gcc-${gcc_version},gcc-ar,gcc-nm,gcc-ranlib,gcov,gfortran} \ @@ -187,6 +190,29 @@ chmod +x %{buildroot}%{our_path}%{_bindir}/python${python_version} ln -s python${python_version} %{buildroot}%{our_path}%{_bindir}/python ln -s python${python_version} %{buildroot}%{our_path}%{_libdir}/python +# rpmlint acceleration +mkdir -p %{buildroot}%{our_path}/opt/testing/bin +cp %{buildroot}%{our_path}%{_bindir}/python${python_version}.orig %{buildroot}%{our_path}/opt/testing/bin/ +cat > %{buildroot}%{our_path}/opt/testing/bin/python${python_version} << EOF +#!/bin/bash +if [ -z "\$PYTHONPATH" ]; then + export PYTHONPATH="%{libdir}/python${python_version}" +else + export PYTHONPATH+=":%{libdir}/python${python_version}" +fi +export PYTHONHOME="%{our_path}%{_prefix}" +%{our_path}/opt/testing/bin/python${python_version}.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/ + + # rename gcc binaries for bin in c++ g++ cpp gcc gcc-ar gcc-nm gcc-ranlib gfortran do @@ -239,11 +265,9 @@ ldconfig %defattr(-,root,root) %{our_path} %exclude %{our_path}%{_bindir}/python* -%exclude %{our_path}%{_prefix}/lib/python*/lib-dynload/*.so %files -n python-accel %defattr(-,root,root) %{our_path}%{_bindir}/python* -%{our_path}%{_prefix}/lib/python*/lib-dynload/*.so %changelog diff --git a/packaging/qemu-accel-armv7l.spec b/packaging/qemu-accel-armv7l.spec index e0ede89..964dca5 100644 --- a/packaging/qemu-accel-armv7l.spec +++ b/packaging/qemu-accel-armv7l.spec @@ -51,6 +51,8 @@ BuildRequires: gawk BuildRequires: libstdc++ BuildRequires: python BuildRequires: python-xml +BuildRequires: python-magic +BuildRequires: python-rpm Summary: Native binaries for speeding up cross compile License: GPL-2.0 Group: Development/Cross Compilation @@ -110,6 +112,7 @@ for executable in $LD \ %{_bindir}/xsltproc \ %{_bindir}/python${python_version} \ %{_libdir}/python${python_version}/lib-dynload/*.so \ + %{_libdir}/python${python_version}/site-packages/*/*.so \ %{_bindir}/{ccmake,cmake,cpack,ctest} \ %{_bindir}/%{target_arch}-{addr2line,ar,as,c++filt,dwp,elfedit,gprof,ld,ld.bfd,ld.gold,nm,objcopy,objdump,ranlib,readelf,size,strings,strip} \ %{_bindir}/%{target_arch}-{c++,g++,cpp,gcc,gcc-${gcc_version},gcc-ar,gcc-nm,gcc-ranlib,gcov,gfortran} \ @@ -187,6 +190,29 @@ chmod +x %{buildroot}%{our_path}%{_bindir}/python${python_version} ln -s python${python_version} %{buildroot}%{our_path}%{_bindir}/python ln -s python${python_version} %{buildroot}%{our_path}%{_libdir}/python +# rpmlint acceleration +mkdir -p %{buildroot}%{our_path}/opt/testing/bin +cp %{buildroot}%{our_path}%{_bindir}/python${python_version}.orig %{buildroot}%{our_path}/opt/testing/bin/ +cat > %{buildroot}%{our_path}/opt/testing/bin/python${python_version} << EOF +#!/bin/bash +if [ -z "\$PYTHONPATH" ]; then + export PYTHONPATH="%{libdir}/python${python_version}" +else + export PYTHONPATH+=":%{libdir}/python${python_version}" +fi +export PYTHONHOME="%{our_path}%{_prefix}" +%{our_path}/opt/testing/bin/python${python_version}.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/ + + # rename gcc binaries for bin in c++ g++ cpp gcc gcc-ar gcc-nm gcc-ranlib gfortran do @@ -239,11 +265,9 @@ ldconfig %defattr(-,root,root) %{our_path} %exclude %{our_path}%{_bindir}/python* -%exclude %{our_path}%{_prefix}/lib/python*/lib-dynload/*.so %files -n python-accel %defattr(-,root,root) %{our_path}%{_bindir}/python* -%{our_path}%{_prefix}/lib/python*/lib-dynload/*.so %changelog diff --git a/packaging/qemu-accel.spec b/packaging/qemu-accel.spec index deaf9d4..a169fca 100644 --- a/packaging/qemu-accel.spec +++ b/packaging/qemu-accel.spec @@ -48,6 +48,8 @@ BuildRequires: gawk BuildRequires: libstdc++ BuildRequires: python BuildRequires: python-xml +BuildRequires: python-magic +BuildRequires: python-rpm Summary: Native binaries for speeding up cross compile License: GPL-2.0 Group: Development/Cross Compilation @@ -107,6 +109,7 @@ for executable in $LD \ %{_bindir}/xsltproc \ %{_bindir}/python${python_version} \ %{_libdir}/python${python_version}/lib-dynload/*.so \ + %{_libdir}/python${python_version}/site-packages/*/*.so \ %{_bindir}/{ccmake,cmake,cpack,ctest} \ %{_bindir}/%{target_arch}-{addr2line,ar,as,c++filt,dwp,elfedit,gprof,ld,ld.bfd,ld.gold,nm,objcopy,objdump,ranlib,readelf,size,strings,strip} \ %{_bindir}/%{target_arch}-{c++,g++,cpp,gcc,gcc-${gcc_version},gcc-ar,gcc-nm,gcc-ranlib,gcov,gfortran} \ @@ -184,6 +187,29 @@ chmod +x %{buildroot}%{our_path}%{_bindir}/python${python_version} ln -s python${python_version} %{buildroot}%{our_path}%{_bindir}/python ln -s python${python_version} %{buildroot}%{our_path}%{_libdir}/python +# rpmlint acceleration +mkdir -p %{buildroot}%{our_path}/opt/testing/bin +cp %{buildroot}%{our_path}%{_bindir}/python${python_version}.orig %{buildroot}%{our_path}/opt/testing/bin/ +cat > %{buildroot}%{our_path}/opt/testing/bin/python${python_version} << EOF +#!/bin/bash +if [ -z "\$PYTHONPATH" ]; then + export PYTHONPATH="%{libdir}/python${python_version}" +else + export PYTHONPATH+=":%{libdir}/python${python_version}" +fi +export PYTHONHOME="%{our_path}%{_prefix}" +%{our_path}/opt/testing/bin/python${python_version}.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/ + + # rename gcc binaries for bin in c++ g++ cpp gcc gcc-ar gcc-nm gcc-ranlib gfortran do @@ -236,11 +262,9 @@ ldconfig %defattr(-,root,root) %{our_path} %exclude %{our_path}%{_bindir}/python* -%exclude %{our_path}%{_prefix}/lib/python*/lib-dynload/*.so %files -n python-accel %defattr(-,root,root) %{our_path}%{_bindir}/python* -%{our_path}%{_prefix}/lib/python*/lib-dynload/*.so %changelog |