summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFrançois Andriot <albator78@libertysurf.fr>2023-04-11 17:18:24 +0200
committerFrançois Andriot <albator78@libertysurf.fr>2023-04-11 17:18:24 +0200
commitd8a1512d34559be713c40bf1b60940213ccde29d (patch)
treefe8206d2acc4ca6def42897f5c225ad7d1dab4d6
parentc58c672b5a1d7cbd8f0294cd9251d754cb44db26 (diff)
downloadtde-packaging-d8a1512d34559be713c40bf1b60940213ccde29d.tar.gz
tde-packaging-d8a1512d34559be713c40bf1b60940213ccde29d.zip
RPM: more updates related to python3
Signed-off-by: François Andriot <albator78@libertysurf.fr>
-rw-r--r--redhat/applications/office/tellico/tellico.spec8
-rw-r--r--redhat/applications/settings/tde-guidance/tde-guidance.spec63
-rw-r--r--redhat/core/tdeaddons/tdeaddons.spec1
-rw-r--r--redhat/core/tdebindings/tdebindings.spec13
-rw-r--r--redhat/dependencies/pytqt/pytqt.spec21
-rw-r--r--redhat/dependencies/sip4-tqt/sip4-tqt.spec8
-rw-r--r--redhat/libraries/pytde/pytde.spec19
-rw-r--r--redhat/libraries/pytdeextensions/pytdeextensions.spec12
8 files changed, 124 insertions, 21 deletions
diff --git a/redhat/applications/office/tellico/tellico.spec b/redhat/applications/office/tellico/tellico.spec
index 42cce3c06..ee92c8f4b 100644
--- a/redhat/applications/office/tellico/tellico.spec
+++ b/redhat/applications/office/tellico/tellico.spec
@@ -220,7 +220,14 @@ documentation.
%{tde_datadir}/apps/tellico/*.xml
%{tde_datadir}/apps/tellico/*.png
%{tde_datadir}/apps/tellico/entry-templates
+%if 0%{?rhel} == 7 || 0%{?suse_version}
%{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/report-templates
%{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-rename.upd
%{tde_datadir}/apps/tdeconf_update/tellico.upd
-%{tde_datadir}/apps/tellico/__pycache__/
##########
diff --git a/redhat/applications/settings/tde-guidance/tde-guidance.spec b/redhat/applications/settings/tde-guidance/tde-guidance.spec
index 7fdabcd06..b047f3226 100644
--- a/redhat/applications/settings/tde-guidance/tde-guidance.spec
+++ b/redhat/applications/settings/tde-guidance/tde-guidance.spec
@@ -190,6 +190,7 @@ or can be run as standalone applications.
%{tde_datadir}/apps/guidance/
%{tde_tdeappdir}/*.desktop
%{tde_datadir}/icons/crystalsvg/*/*/*.png
+%if 0%{?rhel} == 7 || 0%{?suse_version}
%{python_sitearch}/%{name}/SMBShareSelectDialog.py*
%{python_sitearch}/%{name}/SimpleCommandRunner.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}/userconfig.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/
-%{python_sitearch}/%{name}/__pycache__/
# Files from powermanager
%if 0%{?with_powermanager}
@@ -232,11 +258,26 @@ Guidance configuration tools.
%files backends
%defattr(-,root,root,-)
%dir %{python_sitearch}/%{name}
+%if 0%{?rhel} == 7 || 0%{?suse_version}
%{python_sitearch}/%{name}/MicroHAL.py*
%{python_sitearch}/%{name}/drivedetect.py*
%{python_sitearch}/%{name}/wineread.py*
%{python_sitearch}/%{name}/winewrite.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}/xf86misc*.pyc
@@ -265,6 +306,7 @@ suspend using HAL.
%files powermanager
%defattr(-,root,root,-)
%{tde_bindir}/guidance-power-manager
+%if 0%{?rhel} == 7 || 0%{?suse_version}
%{python_sitearch}/%{name}/MicroHAL.py*
%{python_sitearch}/%{name}/guidance-power-manager.py*
%{python_sitearch}/%{name}/powermanage.py*
@@ -273,6 +315,24 @@ suspend using HAL.
%{python_sitearch}/%{name}/guidance_power_manager_ui.py*
%{python_sitearch}/%{name}/notify.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}/apps/guidance/pics/ac-adapter.png
%{tde_datadir}/apps/guidance/pics/battery*.png
@@ -446,6 +506,7 @@ done
# Removes useless files
find %{buildroot} -name "*.egg-info" -exec rm -f {} \;
find %{buildroot}%{tde_libdir} -name "*.a" -exec rm -f {} \;
+%__rm -rf %{buildroot}%{tde_libdir}/python*/site-packages/guidance-*.egg-info/
%clean
diff --git a/redhat/core/tdeaddons/tdeaddons.spec b/redhat/core/tdeaddons/tdeaddons.spec
index 61fb66e1d..5b57a05de 100644
--- a/redhat/core/tdeaddons/tdeaddons.spec
+++ b/redhat/core/tdeaddons/tdeaddons.spec
@@ -140,6 +140,7 @@ BuildRequires: db4-devel
# PYTHON support
%define with_python 1
+%global python python3
%global __python %__python3
Requires: trinity-atlantikdesigner = %{?epoch:%{epoch}:}%{version}-%{release}
diff --git a/redhat/core/tdebindings/tdebindings.spec b/redhat/core/tdebindings/tdebindings.spec
index 34a6c8212..6a69b7d9c 100644
--- a/redhat/core/tdebindings/tdebindings.spec
+++ b/redhat/core/tdebindings/tdebindings.spec
@@ -170,7 +170,8 @@ BuildRequires: Mesa-libGLU-devel
# PYTHON support
%define with_python 1
-%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))")}
BuildRequires: %{python}
@@ -685,8 +686,12 @@ This package is part of the official TDE bindings module.
%defattr(-,root,root,-)
%{python_sitearch}/pcop.la
%{python_sitearch}/pcop.so
+%if 0%{?rhel} == 7 || 0%{?suse_version}
%{python_sitearch}/pydcop.py*
-%{python_sitearch}/__pycache__/*.pyc
+%{python_sitearch}/__pycache__/pydcop.*.pyc
+%else
+%pycached %{python_sitearch}/pydcop.py
+%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"
%endif
+if [ -d "/usr/include/python3.6m" ]; then
+ EXTRA_INCLUDES="/usr/include/python3.6m:${EXTRA_INCLUDES}"
+fi
+
# Warning: GCC visibility causes FTBFS [Bug #1285]
%configure \
--prefix=%{tde_prefix} \
diff --git a/redhat/dependencies/pytqt/pytqt.spec b/redhat/dependencies/pytqt/pytqt.spec
index a36560eab..d7285cd3c 100644
--- a/redhat/dependencies/pytqt/pytqt.spec
+++ b/redhat/dependencies/pytqt/pytqt.spec
@@ -73,8 +73,9 @@ BuildRequires: libtqscintilla-devel >= %{?epoch:%{epoch}:}1.7.1
BuildRequires: gcc-c++
# PYTHON support
-%define python python3
-%define __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))")}
BuildRequires: %{python}
BuildRequires: %{python}-devel
@@ -139,7 +140,14 @@ same way in both languages (with syntax differences, of course)
%defattr(-,root,root,-)
%doc NEWS README
%dir %{python_sitearch}/PyTQt
+%if 0%{?rhel} == 7 || 0%{?suse_version}
%{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/tqtcanvas.so
%{python_sitearch}/PyTQt/tqtnetwork.so
@@ -203,7 +211,6 @@ Linguist translation files from Python code.
%defattr(-,root,root,-)
%{tde_bindir}/pytqlupdate
%{tde_bindir}/pytquic
-%{python_sitearch}/PyTQt/__pycache__/
##########
@@ -223,7 +230,14 @@ packages based on them, like PyTDE.
%files -n pytqt-devel
%defattr(-,root,root,-)
+%if 0%{?rhel} == 7 || 0%{?suse_version}
%{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
%{_datadir}/sip/tqt/
@@ -270,7 +284,6 @@ echo yes | %__python ../configure.py \
%clean
-%__rm -rf %{?buildroot}%{python_sitearch}/PyTQt/__init__.py
%changelog
diff --git a/redhat/dependencies/sip4-tqt/sip4-tqt.spec b/redhat/dependencies/sip4-tqt/sip4-tqt.spec
index 3abec1152..299f98393 100644
--- a/redhat/dependencies/sip4-tqt/sip4-tqt.spec
+++ b/redhat/dependencies/sip4-tqt/sip4-tqt.spec
@@ -111,9 +111,15 @@ specificity towards C++ and Python.
%files -n sip4-tqt
%defattr(-,root,root,-)
%{python_sitearch}/sip_tqt.so
+%if 0%{?rhel} == 7 || 0%{?suse_version}
%{python_sitearch}/sip_tqt_config.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
##########
diff --git a/redhat/libraries/pytde/pytde.spec b/redhat/libraries/pytde/pytde.spec
index 2e38227e1..cfe105cbb 100644
--- a/redhat/libraries/pytde/pytde.spec
+++ b/redhat/libraries/pytde/pytde.spec
@@ -64,6 +64,8 @@ BuildRequires: gcc-c++
# PYTHON support
%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
@@ -89,9 +91,20 @@ from tdeio, tdejs, tdehtml and tdeprint.
%defattr(-,root,root,-)
%doc AUTHORS ChangeLog COPYING NEWS README
%{python_sitearch}/*.so
-%{python_sitearch}/dcop*.py*
-%{python_sitearch}/pytde*.py*
-%{python_sitearch}/__pycache__/*.pyc
+%if 0%{?rhel} == 7 || 0%{?suse_version}
+%{python_sitearch}/dcopexport.py*
+%{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
##########
diff --git a/redhat/libraries/pytdeextensions/pytdeextensions.spec b/redhat/libraries/pytdeextensions/pytdeextensions.spec
index b55b892fd..edab0594a 100644
--- a/redhat/libraries/pytdeextensions/pytdeextensions.spec
+++ b/redhat/libraries/pytdeextensions/pytdeextensions.spec
@@ -76,6 +76,8 @@ Requires: sip4-tqt >= 4.10.5
# PYTHON support
%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
@@ -176,14 +178,6 @@ for f in src/*.py; do
-e "s|/usr/lib/pyshared/python\*|%{python_sitearch}|g"
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
%if 0%{?rhel} == 5
%__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/tdeioslave/setup.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