summaryrefslogtreecommitdiffstats
path: root/redhat/libraries
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 /redhat/libraries
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>
Diffstat (limited to 'redhat/libraries')
-rw-r--r--redhat/libraries/pytde/pytde.spec19
-rw-r--r--redhat/libraries/pytdeextensions/pytdeextensions.spec12
2 files changed, 19 insertions, 12 deletions
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