avoid conditional requires for python packages

f41
David Tardon 10 years ago
parent 602b80a212
commit c1cdecb581

@ -7,11 +7,13 @@
# rhbz#715152 state vendor # rhbz#715152 state vendor
%if 0%{?rhel} %if 0%{?rhel}
%define vendoroption --with-vendor="Red Hat, Inc." %define vendoroption --with-vendor="Red Hat, Inc."
%define libo_python3 %{nil} %define libo_use_python3 %{nil}
%define libo_python python
%define libo_python_sitearch %{python_sitearch} %define libo_python_sitearch %{python_sitearch}
%endif %endif
%if 0%{?fedora} %if 0%{?fedora}
%define libo_python3 1 %define libo_use_python3 1
%define libo_python python3
%define libo_python_sitearch %{python3_sitearch} %define libo_python_sitearch %{python3_sitearch}
%define vendoroption --with-vendor="The Fedora Project" %define vendoroption --with-vendor="The Fedora Project"
%endif %endif
@ -253,11 +255,7 @@ BuildRequires: pkgconfig(bluez)
%endif %endif
%endif %endif
%if 0%{libo_python3} BuildRequires: %{libo_python}-devel
BuildRequires: pkgconfig(python3)
%else
BuildRequires: python-devel
%endif
# java stuff # java stuff
BuildRequires: ant BuildRequires: ant
@ -429,12 +427,8 @@ Summary: Python support for LibreOffice
Group: Development/Libraries Group: Development/Libraries
Requires: %{name}-core = %{epoch}:%{version}-%{release} Requires: %{name}-core = %{epoch}:%{version}-%{release}
Requires: %{name}-ure = %{epoch}:%{version}-%{release} Requires: %{name}-ure = %{epoch}:%{version}-%{release}
%if 0%{libo_python3} Requires: %{libo_python}
Requires: python3
%else
Requires: python
Obsoletes: openoffice.org-pyuno < 1:3.3.1 Obsoletes: openoffice.org-pyuno < 1:3.3.1
%endif
%if 0%{?rhel} && 0%{?rhel} < 7 %if 0%{?rhel} && 0%{?rhel} < 7
Provides: openoffice.org-pyuno = 1:3.3.0 Provides: openoffice.org-pyuno = 1:3.3.0
Provides: openoffice.org-pyuno%{?_isa} = 1:3.3.0 Provides: openoffice.org-pyuno%{?_isa} = 1:3.3.0
@ -873,11 +867,7 @@ package or when debugging this package.
Summary: Additional support for debugging with gdb Summary: Additional support for debugging with gdb
Group: Development/Debug Group: Development/Debug
Requires: gdb Requires: gdb
%if 0%{libo_python3} Requires: %{libo_python}-six
Requires: python3-six
%else
Requires: python-six
%endif
AutoReqProv: 0 AutoReqProv: 0
%description gdb-debug-support %description gdb-debug-support
@ -1265,7 +1255,7 @@ export OPENCOLLADA_LIBS='-lOpenCOLLADABaseUtils -lOpenCOLLADAFramework -lOpenCOL
%define with_lang --with-lang='%{langpack_langs}' %define with_lang --with-lang='%{langpack_langs}'
%endif %endif
%if ! 0%{libo_python3} %if ! 0%{libo_use_python3}
export PYTHON=%{_bindir}/python export PYTHON=%{_bindir}/python
%if 0%{?fedora} || 0%{?rhel} >= 7 %if 0%{?fedora} || 0%{?rhel} >= 7
export PYTHON_CFLAGS=`pkg-config --cflags python` export PYTHON_CFLAGS=`pkg-config --cflags python`
@ -2422,7 +2412,7 @@ update-desktop-database %{_datadir}/applications &> /dev/null || :
%{libo_python_sitearch}/uno.py* %{libo_python_sitearch}/uno.py*
%{libo_python_sitearch}/unohelper.py* %{libo_python_sitearch}/unohelper.py*
%{libo_python_sitearch}/officehelper.py* %{libo_python_sitearch}/officehelper.py*
%if 0%{libo_python3} %if 0%{libo_use_python3}
%{libo_python_sitearch}/__pycache__/uno.cpython-* %{libo_python_sitearch}/__pycache__/uno.cpython-*
%{libo_python_sitearch}/__pycache__/unohelper.cpython-* %{libo_python_sitearch}/__pycache__/unohelper.cpython-*
%{libo_python_sitearch}/__pycache__/officehelper.cpython-* %{libo_python_sitearch}/__pycache__/officehelper.cpython-*

Loading…
Cancel
Save