RPM: more updates related to python3

Signed-off-by: François Andriot <albator78@libertysurf.fr>
pull/219/head
François Andriot 2 years ago
parent c58c672b5a
commit d8a1512d34

@ -220,7 +220,14 @@ documentation.
%{tde_datadir}/apps/tellico/*.xml %{tde_datadir}/apps/tellico/*.xml
%{tde_datadir}/apps/tellico/*.png %{tde_datadir}/apps/tellico/*.png
%{tde_datadir}/apps/tellico/entry-templates %{tde_datadir}/apps/tellico/entry-templates
%if 0%{?rhel} == 7 || 0%{?suse_version}
%{tde_datadir}/apps/tellico/*.py* %{tde_datadir}/apps/tellico/*.py*
%if 0%{?rhel} == 7
%{tde_datadir}/apps/tellico/__pycache__/
%endif
%else
%pycached %{tde_datadir}/apps/tellico/*.py
%endif
%{tde_datadir}/apps/tellico/pics %{tde_datadir}/apps/tellico/pics
%{tde_datadir}/apps/tellico/report-templates %{tde_datadir}/apps/tellico/report-templates
%{tde_datadir}/apps/tellico/tellico.dtd %{tde_datadir}/apps/tellico/tellico.dtd
@ -239,7 +246,6 @@ documentation.
%{tde_datadir}/apps/tdeconf_update/tellico-1-3-update.pl %{tde_datadir}/apps/tdeconf_update/tellico-1-3-update.pl
%{tde_datadir}/apps/tdeconf_update/tellico-rename.upd %{tde_datadir}/apps/tdeconf_update/tellico-rename.upd
%{tde_datadir}/apps/tdeconf_update/tellico.upd %{tde_datadir}/apps/tdeconf_update/tellico.upd
%{tde_datadir}/apps/tellico/__pycache__/
########## ##########

@ -190,6 +190,7 @@ or can be run as standalone applications.
%{tde_datadir}/apps/guidance/ %{tde_datadir}/apps/guidance/
%{tde_tdeappdir}/*.desktop %{tde_tdeappdir}/*.desktop
%{tde_datadir}/icons/crystalsvg/*/*/*.png %{tde_datadir}/icons/crystalsvg/*/*/*.png
%if 0%{?rhel} == 7 || 0%{?suse_version}
%{python_sitearch}/%{name}/SMBShareSelectDialog.py* %{python_sitearch}/%{name}/SMBShareSelectDialog.py*
%{python_sitearch}/%{name}/SimpleCommandRunner.py* %{python_sitearch}/%{name}/SimpleCommandRunner.py*
%{python_sitearch}/%{name}/fuser.py* %{python_sitearch}/%{name}/fuser.py*
@ -201,8 +202,33 @@ or can be run as standalone applications.
%{python_sitearch}/%{name}/unixauthdb.py* %{python_sitearch}/%{name}/unixauthdb.py*
%{python_sitearch}/%{name}/userconfig.py* %{python_sitearch}/%{name}/userconfig.py*
%{python_sitearch}/%{name}/wineconfig.py* %{python_sitearch}/%{name}/wineconfig.py*
%if 0%{?rhel} == 7
%{python_sitearch}/%{name}/__pycache__/SMBShareSelectDialog.*.pyc
%{python_sitearch}/%{name}/__pycache__/SimpleCommandRunner.*.pyc
%{python_sitearch}/%{name}/__pycache__/fuser.*.pyc
%{python_sitearch}/%{name}/__pycache__/fuser_ui.*.pyc
%{python_sitearch}/%{name}/__pycache__/grubconfig.*.pyc
%{python_sitearch}/%{name}/__pycache__/mountconfig.*.pyc
%{python_sitearch}/%{name}/__pycache__/serviceconfig.*.pyc
%{python_sitearch}/%{name}/__pycache__/sizeview.*.pyc
%{python_sitearch}/%{name}/__pycache__/unixauthdb.*.pyc
%{python_sitearch}/%{name}/__pycache__/userconfig.*.pyc
%{python_sitearch}/%{name}/__pycache__/wineconfig.*.pyc
%endif
%else
%pycached %{python_sitearch}/%{name}/SMBShareSelectDialog.py
%pycached %{python_sitearch}/%{name}/SimpleCommandRunner.py
%pycached %{python_sitearch}/%{name}/fuser.py
%pycached %{python_sitearch}/%{name}/fuser_ui.py
%pycached %{python_sitearch}/%{name}/grubconfig.py
%pycached %{python_sitearch}/%{name}/mountconfig.py
%pycached %{python_sitearch}/%{name}/serviceconfig.py
%pycached %{python_sitearch}/%{name}/sizeview.py
%pycached %{python_sitearch}/%{name}/unixauthdb.py
%pycached %{python_sitearch}/%{name}/userconfig.py
%pycached %{python_sitearch}/%{name}/wineconfig.py
%endif
%{tde_tdedocdir}/HTML/en/guidance/ %{tde_tdedocdir}/HTML/en/guidance/
%{python_sitearch}/%{name}/__pycache__/
# Files from powermanager # Files from powermanager
%if 0%{?with_powermanager} %if 0%{?with_powermanager}
@ -232,11 +258,26 @@ Guidance configuration tools.
%files backends %files backends
%defattr(-,root,root,-) %defattr(-,root,root,-)
%dir %{python_sitearch}/%{name} %dir %{python_sitearch}/%{name}
%if 0%{?rhel} == 7 || 0%{?suse_version}
%{python_sitearch}/%{name}/MicroHAL.py* %{python_sitearch}/%{name}/MicroHAL.py*
%{python_sitearch}/%{name}/drivedetect.py* %{python_sitearch}/%{name}/drivedetect.py*
%{python_sitearch}/%{name}/wineread.py* %{python_sitearch}/%{name}/wineread.py*
%{python_sitearch}/%{name}/winewrite.py* %{python_sitearch}/%{name}/winewrite.py*
%{python_sitearch}/%{name}/xf86misc.py* %{python_sitearch}/%{name}/xf86misc.py*
%if 0%{?rhel} == 7
%{python_sitearch}/%{name}/__pycache__/MicroHAL.*.pyc
%{python_sitearch}/%{name}/__pycache__/drivedetect.*.pyc
%{python_sitearch}/%{name}/__pycache__/wineread.*.pyc
%{python_sitearch}/%{name}/__pycache__/winewrite.*.pyc
%{python_sitearch}/%{name}/__pycache__/xf86misc.*.pyc
%endif
%else
%pycached %{python_sitearch}/%{name}/MicroHAL.py
%pycached %{python_sitearch}/%{name}/drivedetect.py
%pycached %{python_sitearch}/%{name}/wineread.py
%pycached %{python_sitearch}/%{name}/winewrite.py
%pycached %{python_sitearch}/%{name}/xf86misc.py
%endif
%{python_sitearch}/ixf86misc*.so %{python_sitearch}/ixf86misc*.so
%{python_sitearch}/xf86misc*.pyc %{python_sitearch}/xf86misc*.pyc
@ -265,6 +306,7 @@ suspend using HAL.
%files powermanager %files powermanager
%defattr(-,root,root,-) %defattr(-,root,root,-)
%{tde_bindir}/guidance-power-manager %{tde_bindir}/guidance-power-manager
%if 0%{?rhel} == 7 || 0%{?suse_version}
%{python_sitearch}/%{name}/MicroHAL.py* %{python_sitearch}/%{name}/MicroHAL.py*
%{python_sitearch}/%{name}/guidance-power-manager.py* %{python_sitearch}/%{name}/guidance-power-manager.py*
%{python_sitearch}/%{name}/powermanage.py* %{python_sitearch}/%{name}/powermanage.py*
@ -273,6 +315,24 @@ suspend using HAL.
%{python_sitearch}/%{name}/guidance_power_manager_ui.py* %{python_sitearch}/%{name}/guidance_power_manager_ui.py*
%{python_sitearch}/%{name}/notify.py* %{python_sitearch}/%{name}/notify.py*
%{python_sitearch}/%{name}/tooltip.py* %{python_sitearch}/%{name}/tooltip.py*
%{python_sitearch}/%{name}/__pycache__/MicroHAL.*.pyc
%{python_sitearch}/%{name}/__pycache__/guidance-power-manager.*.pyc
%{python_sitearch}/%{name}/__pycache__/powermanage.*.pyc
%{python_sitearch}/%{name}/__pycache__/gpmhelper.*.pyc
%{python_sitearch}/%{name}/__pycache__/powermanager_ui.*.pyc
%{python_sitearch}/%{name}/__pycache__/guidance_power_manager_ui.*.pyc
%{python_sitearch}/%{name}/__pycache__/notify.*.pyc
%{python_sitearch}/%{name}/__pycache__/tooltip.*.pyc
%else
%pycached %{python_sitearch}/%{name}/MicroHAL.py
%pycached %{python_sitearch}/%{name}/guidance-power-manager.py
%pycached %{python_sitearch}/%{name}/powermanage.py
%pycached %{python_sitearch}/%{name}/gpmhelper.py
%pycached %{python_sitearch}/%{name}/powermanager_ui.py
%pycached %{python_sitearch}/%{name}/guidance_power_manager_ui.py
%pycached %{python_sitearch}/%{name}/notify.py
%pycached %{python_sitearch}/%{name}/tooltip.py
%endif
%{tde_datadir}/icons/hicolor/22x22/apps/power-manager.png %{tde_datadir}/icons/hicolor/22x22/apps/power-manager.png
%{tde_datadir}/apps/guidance/pics/ac-adapter.png %{tde_datadir}/apps/guidance/pics/ac-adapter.png
%{tde_datadir}/apps/guidance/pics/battery*.png %{tde_datadir}/apps/guidance/pics/battery*.png
@ -446,6 +506,7 @@ done
# Removes useless files # Removes useless files
find %{buildroot} -name "*.egg-info" -exec rm -f {} \; find %{buildroot} -name "*.egg-info" -exec rm -f {} \;
find %{buildroot}%{tde_libdir} -name "*.a" -exec rm -f {} \; find %{buildroot}%{tde_libdir} -name "*.a" -exec rm -f {} \;
%__rm -rf %{buildroot}%{tde_libdir}/python*/site-packages/guidance-*.egg-info/
%clean %clean

@ -140,6 +140,7 @@ BuildRequires: db4-devel
# PYTHON support # PYTHON support
%define with_python 1 %define with_python 1
%global python python3
%global __python %__python3 %global __python %__python3
Requires: trinity-atlantikdesigner = %{?epoch:%{epoch}:}%{version}-%{release} Requires: trinity-atlantikdesigner = %{?epoch:%{epoch}:}%{version}-%{release}

@ -170,7 +170,8 @@ BuildRequires: Mesa-libGLU-devel
# PYTHON support # PYTHON support
%define with_python 1 %define with_python 1
%global __python python3 %global python python3
%global __python %__python3
%global python_sitearch %{python3_sitearch} %global python_sitearch %{python3_sitearch}
%{!?python_sitearch:%global python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib(1))")} %{!?python_sitearch:%global python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib(1))")}
BuildRequires: %{python} BuildRequires: %{python}
@ -685,8 +686,12 @@ This package is part of the official TDE bindings module.
%defattr(-,root,root,-) %defattr(-,root,root,-)
%{python_sitearch}/pcop.la %{python_sitearch}/pcop.la
%{python_sitearch}/pcop.so %{python_sitearch}/pcop.so
%if 0%{?rhel} == 7 || 0%{?suse_version}
%{python_sitearch}/pydcop.py* %{python_sitearch}/pydcop.py*
%{python_sitearch}/__pycache__/*.pyc %{python_sitearch}/__pycache__/pydcop.*.pyc
%else
%pycached %{python_sitearch}/pydcop.py
%endif
%endif %endif
@ -1132,6 +1137,10 @@ EXTRA_INCLUDES="/usr/include/ruby-%{rb20_ver}:/usr/include/ruby-%{rb20_ver}/%{_t
EXTRA_INCLUDES="/usr/include/ruby-%{rb_ver}:/usr/include/ruby-%{rb_ver}/%{_target}-gnu" EXTRA_INCLUDES="/usr/include/ruby-%{rb_ver}:/usr/include/ruby-%{rb_ver}/%{_target}-gnu"
%endif %endif
if [ -d "/usr/include/python3.6m" ]; then
EXTRA_INCLUDES="/usr/include/python3.6m:${EXTRA_INCLUDES}"
fi
# Warning: GCC visibility causes FTBFS [Bug #1285] # Warning: GCC visibility causes FTBFS [Bug #1285]
%configure \ %configure \
--prefix=%{tde_prefix} \ --prefix=%{tde_prefix} \

@ -73,8 +73,9 @@ BuildRequires: libtqscintilla-devel >= %{?epoch:%{epoch}:}1.7.1
BuildRequires: gcc-c++ BuildRequires: gcc-c++
# PYTHON support # PYTHON support
%define python python3 %global python python3
%define __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))")} %{!?python_sitearch:%global python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib(1))")}
BuildRequires: %{python} BuildRequires: %{python}
BuildRequires: %{python}-devel BuildRequires: %{python}-devel
@ -139,7 +140,14 @@ same way in both languages (with syntax differences, of course)
%defattr(-,root,root,-) %defattr(-,root,root,-)
%doc NEWS README %doc NEWS README
%dir %{python_sitearch}/PyTQt %dir %{python_sitearch}/PyTQt
%if 0%{?rhel} == 7 || 0%{?suse_version}
%{python_sitearch}/PyTQt/__init__.py* %{python_sitearch}/PyTQt/__init__.py*
%if 0%{?rhel} == 7
%{python_sitearch}/PyTQt/__pycache__/__init__.*.pyc
%endif
%else
%pycached %{python_sitearch}/PyTQt/__init__.py
%endif
%{python_sitearch}/PyTQt/tqt.so %{python_sitearch}/PyTQt/tqt.so
%{python_sitearch}/PyTQt/tqtcanvas.so %{python_sitearch}/PyTQt/tqtcanvas.so
%{python_sitearch}/PyTQt/tqtnetwork.so %{python_sitearch}/PyTQt/tqtnetwork.so
@ -203,7 +211,6 @@ Linguist translation files from Python code.
%defattr(-,root,root,-) %defattr(-,root,root,-)
%{tde_bindir}/pytqlupdate %{tde_bindir}/pytqlupdate
%{tde_bindir}/pytquic %{tde_bindir}/pytquic
%{python_sitearch}/PyTQt/__pycache__/
########## ##########
@ -223,7 +230,14 @@ packages based on them, like PyTDE.
%files -n pytqt-devel %files -n pytqt-devel
%defattr(-,root,root,-) %defattr(-,root,root,-)
%if 0%{?rhel} == 7 || 0%{?suse_version}
%{python_sitearch}/PyTQt/pytqtconfig.py* %{python_sitearch}/PyTQt/pytqtconfig.py*
%if 0%{?rhel} == 7
%{python_sitearch}/PyTQt/__pycache__/pytqtconfig.*.pyc
%endif
%else
%pycached %{python_sitearch}/PyTQt/pytqtconfig.py
%endif
%dir %{_datadir}/sip %dir %{_datadir}/sip
%{_datadir}/sip/tqt/ %{_datadir}/sip/tqt/
@ -270,7 +284,6 @@ echo yes | %__python ../configure.py \
%clean %clean
%__rm -rf %{?buildroot}%{python_sitearch}/PyTQt/__init__.py
%changelog %changelog

@ -111,9 +111,15 @@ specificity towards C++ and Python.
%files -n sip4-tqt %files -n sip4-tqt
%defattr(-,root,root,-) %defattr(-,root,root,-)
%{python_sitearch}/sip_tqt.so %{python_sitearch}/sip_tqt.so
%if 0%{?rhel} == 7 || 0%{?suse_version}
%{python_sitearch}/sip_tqt_config.py* %{python_sitearch}/sip_tqt_config.py*
%{python_sitearch}/sip_tqt_distutils.py* %{python_sitearch}/sip_tqt_distutils.py*
%{python_sitearch}/__pycache__/*.pyc %{python_sitearch}/__pycache__/sip_tqt_config.*.pyc
%{python_sitearch}/__pycache__/sip_tqt_distutils.*.pyc
%else
%pycached %{python_sitearch}/sip_tqt_config.py
%pycached %{python_sitearch}/sip_tqt_distutils.py
%endif
########## ##########

@ -64,6 +64,8 @@ BuildRequires: gcc-c++
# PYTHON support # PYTHON support
%global python python3 %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))")} %{!?python_sitearch:%global python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib(1))")}
BuildRequires: %{python} BuildRequires: %{python}
BuildRequires: %{python}-devel BuildRequires: %{python}-devel
@ -89,9 +91,20 @@ from tdeio, tdejs, tdehtml and tdeprint.
%defattr(-,root,root,-) %defattr(-,root,root,-)
%doc AUTHORS ChangeLog COPYING NEWS README %doc AUTHORS ChangeLog COPYING NEWS README
%{python_sitearch}/*.so %{python_sitearch}/*.so
%{python_sitearch}/dcop*.py* %if 0%{?rhel} == 7 || 0%{?suse_version}
%{python_sitearch}/pytde*.py* %{python_sitearch}/dcopexport.py*
%{python_sitearch}/__pycache__/*.pyc %{python_sitearch}/dcopext.py*
%{python_sitearch}/pytdeconfig.py*
%if 0%{?rhel} == 7
%{python_sitearch}/__pycache__/dcopexport.*.pyc
%{python_sitearch}/__pycache__/dcopext.*.pyc
%{python_sitearch}/__pycache__/pytdeconfig.*.pyc
%endif
%else
%pycached %{python_sitearch}/dcopexport.py
%pycached %{python_sitearch}/dcopext.py
%pycached %{python_sitearch}/pytdeconfig.py
%endif
########## ##########

@ -76,6 +76,8 @@ Requires: sip4-tqt >= 4.10.5
# PYTHON support # PYTHON support
%global python python3 %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))")} %{!?python_sitearch:%global python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib(1))")}
BuildRequires: %{python} BuildRequires: %{python}
BuildRequires: %{python}-devel BuildRequires: %{python}-devel
@ -176,14 +178,6 @@ for f in src/*.py; do
-e "s|/usr/lib/pyshared/python\*|%{python_sitearch}|g" -e "s|/usr/lib/pyshared/python\*|%{python_sitearch}|g"
done done
# Do not look for 'libpython2.x.so' (from -devel) package.
# Instead look for versioned runtime library.
LIBPYTHON="$(readlink %{_libdir}/libpython2.*.so)"
if [ -f "%{_libdir}/${LIBPYTHON}" ]; then
%__sed -i "src/tdedistutils.py" \
-e "s|#define LIB_PYTHON \".*\"|#define LIB_PYTHON \"%{_libdir}/${LIBPYTHON}\"|"
fi
# Fix FTBFS on RHEL 5 # Fix FTBFS on RHEL 5
%if 0%{?rhel} == 5 %if 0%{?rhel} == 5
%__sed -i "src/pythonize."* -e "s|const char \*object|char \*object|g" %__sed -i "src/pythonize."* -e "s|const char \*object|char \*object|g"
@ -198,7 +192,7 @@ fi
"app_templates/kdeutility/src/kdeutility.py" \ "app_templates/kdeutility/src/kdeutility.py" \
"app_templates/tdeioslave/setup.py" \ "app_templates/tdeioslave/setup.py" \
"app_templates/tdeioslave/src/tdeioslave.py" \ "app_templates/tdeioslave/src/tdeioslave.py" \
-e "s|/usr/bin/python|/usr/bin/env python2|" -e "s|/usr/bin/python|/usr/bin/env %{python}|"
%endif %endif

Loading…
Cancel
Save