Simplify RHEL conditionals

Just use %rhel everywhere, not a mix of %rhel and %bcond.
This commit is contained in:
Kalev Lember 2017-01-17 07:48:34 +01:00
parent 1e8c7eb505
commit 8b378d04fd

View File

@ -1,14 +1,5 @@
%global debug_package %{nil}
# Enable Python 3 builds for Fedora
%if 0%{?fedora}
# If the definition isn't available for python3_pkgversion, define it
%{?!python3_pkgversion:%global python3_pkgversion 3}
%bcond_without python3
%else
%bcond_with python3
%endif
Name: pyatspi
Version: 2.20.2
Release: 3%{?dist}
@ -37,7 +28,7 @@ BuildRequires: pkgconfig(pygobject-3.0) >= 2.90.1
BuildRequires: python-dbus
BuildRequires: python-enum34
%if %{with python3}
%if !0%{?rhel}
BuildRequires: python3-devel
BuildRequires: python3-dbus
%endif
@ -56,7 +47,7 @@ scripting interfaces can query and interact with GUI controls.
This package includes a python2 client library for at-spi.
%if %{with python3}
%if !0%{?rhel}
%package -n python3-pyatspi
Summary: Python3 bindings for at-spi
Requires: at-spi2-core
@ -69,17 +60,17 @@ automation, so tools such as screen readers, magnifiers, or even
scripting interfaces can query and interact with GUI controls.
This package includes a python3 client library for at-spi.
%endif # with_python3
%endif
%prep
%autosetup -p1
%if %{with python3}
%if !0%{?rhel}
# Make a copy of the source tree for building the python3 module
rm -rf %{py3dir}
cp -a . %{py3dir}
%endif #with_python3
%endif
%build