diff options
Diffstat (limited to 'redhat')
-rw-r--r-- | redhat/applications/settings/tde-guidance/tde-guidance.spec | 29 |
1 files changed, 11 insertions, 18 deletions
diff --git a/redhat/applications/settings/tde-guidance/tde-guidance.spec b/redhat/applications/settings/tde-guidance/tde-guidance.spec index b4193b7e0..7fdabcd06 100644 --- a/redhat/applications/settings/tde-guidance/tde-guidance.spec +++ b/redhat/applications/settings/tde-guidance/tde-guidance.spec @@ -143,14 +143,10 @@ BuildRequires: xscreensaver-gl %endif # PYTHON support -%if 0%{?rhel} >= 8 || 0%{?fedora} >= 31 || 0%{?suse_version} >= 1550 || 0%{?mgaversion} >= 8 -%global python python2 -%global __python %__python2 -%global python_sitearch %{python2_sitearch} -%else -%global python python -%endif -%{!?python_sitearch:%global python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)")} +%global python python3 +%global __python %__python3 +%global python_sitearch %{python3_sitearch} +%{!?python_sitearch:%global python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib(1))")} BuildRequires: %{python} BuildRequires: %{python}-devel @@ -206,7 +202,7 @@ or can be run as standalone applications. %{python_sitearch}/%{name}/userconfig.py* %{python_sitearch}/%{name}/wineconfig.py* %{tde_tdedocdir}/HTML/en/guidance/ - +%{python_sitearch}/%{name}/__pycache__/ # Files from powermanager %if 0%{?with_powermanager} @@ -241,7 +237,8 @@ Guidance configuration tools. %{python_sitearch}/%{name}/wineread.py* %{python_sitearch}/%{name}/winewrite.py* %{python_sitearch}/%{name}/xf86misc.py* -%{python_sitearch}/ixf86misc.so +%{python_sitearch}/ixf86misc*.so +%{python_sitearch}/xf86misc*.pyc ########## @@ -384,8 +381,9 @@ chrpath -r %{tde_libdir} %{buildroot}%{tde_tdelibdir}/kcm_*.so ##### BACKENDS INSTALLATION # The xf86misc stuff should not go under /opt/trinity bur under /usr !!! -%__mv -f %{buildroot}%{tde_libdir}/python*/site-packages/ixf86misc.so %{buildroot}%{python_sitearch} -%__mv -f %{buildroot}%{tde_libdir}/python*/site-packages/xf86misc.py* %{buildroot}%{python_sitearch}/%{name} +%__mv -f %{buildroot}%{tde_libdir}/python*/site-packages/ixf86misc*.so %{buildroot}%{python_sitearch}/ +%__mv -f %{buildroot}%{tde_libdir}/python*/site-packages/__pycache__/xf86misc*.pyc %{buildroot}%{python_sitearch}/ +%__mv -f %{buildroot}%{tde_libdir}/python*/site-packages/xf86misc.py* %{buildroot}%{python_sitearch}/%{name}/ %if 0%{?rhel} || 0%{?fedora} || 0%{?mgaversion} || 0%{?mdkversion} %__rm -f %{buildroot}%{tde_datadir}/apps/guidance/MonitorsDB @@ -433,13 +431,8 @@ chmod 0755 %{buildroot}%{python_sitearch}/%{name}/gpmhelper.py # Replace all '#!' calls to python with /usr/bin/python # and make them executable -%if 0%{?fedora} >= 30 || 0%{?rhel} >= 8 || 0%{?mgaversion} >= 8 -%define python /usr/bin/python2 -%else -%define python /usr/bin/python -%endif for i in `find %{buildroot} -type f`; do - sed '1s,#!.*python[^ ]*\(.*\),#! %python\1,' \ + sed '1s,#!.*python[^ ]*\(.*\),#!/usr/bin/env %python\1,' \ $i > $i.temp; if cmp --quiet $i $i.temp; then rm -f $i.temp; |