use %bcond_* for python3
Signed-off-by: Igor Gnatenko <i.gnatenko.brain@gmail.com>
This commit is contained in:
parent
df18114988
commit
8cc55f94cc
16
libpeas.spec
16
libpeas.spec
@ -1,7 +1,7 @@
|
||||
%if 0%{?rhel} == 0
|
||||
%global use_python3 1
|
||||
%if 0%{?rhel} && 0%{?rhel} <= 7
|
||||
%bcond_with python3
|
||||
%else
|
||||
%global use_python3 0
|
||||
%bcond_without python3
|
||||
%endif
|
||||
|
||||
Name: libpeas
|
||||
@ -15,10 +15,6 @@ Source0: https://download.gnome.org/sources/%{name}/1.20/%{name}-%{version}.tar.
|
||||
|
||||
BuildRequires: pkgconfig(gtk+-3.0) >= 3.0.0
|
||||
BuildRequires: pkgconfig(pygobject-3.0)
|
||||
BuildRequires: python-devel
|
||||
%if %{use_python3}
|
||||
BuildRequires: python3-devel
|
||||
%endif
|
||||
BuildRequires: intltool
|
||||
BuildRequires: pkgconfig(gladeui-2.0)
|
||||
|
||||
@ -31,6 +27,7 @@ to GTK+ and glib-based applications.
|
||||
|
||||
%package loader-python
|
||||
Summary: Python 2 loader for libpeas
|
||||
BuildRequires: python2-devel
|
||||
Requires: %{name}%{?_isa} = %{version}-%{release}
|
||||
Requires: pygobject3
|
||||
|
||||
@ -38,9 +35,10 @@ Requires: pygobject3
|
||||
This package contains the Python 2 loader that is needed to
|
||||
run Python 2 plugins that use libpeas.
|
||||
|
||||
%if %{use_python3}
|
||||
%if %{with python3}
|
||||
%package loader-python3
|
||||
Summary: Python 3 loader for libpeas
|
||||
BuildRequires: python3-devel
|
||||
Requires: %{name}%{?_isa} = %{version}-%{release}
|
||||
Requires: python3-gobject
|
||||
|
||||
@ -95,7 +93,7 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor >&/dev/null || :
|
||||
%files loader-python
|
||||
%{_libdir}/libpeas-1.0/loaders/libpythonloader.so
|
||||
|
||||
%if %{use_python3}
|
||||
%if %{with python3}
|
||||
%files loader-python3
|
||||
%{_libdir}/libpeas-1.0/loaders/libpython3loader.so
|
||||
%endif
|
||||
|
||||
Loading…
Reference in New Issue
Block a user