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/core/tdeaddons/tdeaddons.spec | 1 + redhat/core/tdebindings/tdebindings.spec | 13 +++++++++++-- 2 files changed, 12 insertions(+), 2 deletions(-) (limited to 'redhat/core') 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} \ -- cgit v1.2.1