From d8a1512d34559be713c40bf1b60940213ccde29d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois=20Andriot?= Date: Tue, 11 Apr 2023 17:18:24 +0200 Subject: RPM: more updates related to python3 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: François Andriot --- redhat/dependencies/pytqt/pytqt.spec | 21 +++++++++++++++++---- 1 file changed, 17 insertions(+), 4 deletions(-) (limited to 'redhat/dependencies/pytqt/pytqt.spec') 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 -- cgit v1.2.1