summaryrefslogtreecommitdiffstats
path: root/redhat/dependencies
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/dependencies
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/dependencies')
-rw-r--r--redhat/dependencies/pytqt/pytqt.spec21
-rw-r--r--redhat/dependencies/sip4-tqt/sip4-tqt.spec8
2 files changed, 24 insertions, 5 deletions
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
##########