summaryrefslogtreecommitdiffstats
path: root/redhat/dependencies/pytqt/pytqt.spec
diff options
context:
space:
mode:
Diffstat (limited to 'redhat/dependencies/pytqt/pytqt.spec')
-rw-r--r--redhat/dependencies/pytqt/pytqt.spec21
1 files changed, 17 insertions, 4 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