From fa07070eb0e5f9258c971021df35b942c19d4b81 Mon Sep 17 00:00:00 2001 From: Igor Gnatenko Date: Mon, 1 Oct 2018 12:42:41 +0200 Subject: [PATCH] disable python2 subpackage Signed-off-by: Igor Gnatenko --- libsolv.spec | 25 ++++++++++++++++++++++--- 1 file changed, 22 insertions(+), 3 deletions(-) diff --git a/libsolv.spec b/libsolv.spec index 08c3c47..ec172d3 100644 --- a/libsolv.spec +++ b/libsolv.spec @@ -1,6 +1,10 @@ %global libname solv +%if (0%{?rhel} && 0%{?rhel} <= 7) || (0%{?fedora} && 0%{?fedora} <= 29) %bcond_without python2_bindings +%else +%bcond_with python2_bindings +%endif %if 0%{?rhel} && 0%{?rhel} <= 7 %bcond_with perl_bindings %bcond_with ruby_bindings @@ -38,7 +42,7 @@ Name: lib%{libname} Version: 0.6.35 -Release: 1%{?commit:.git.%{commitnum}.%{?shortcommit}}%{?dist} +Release: 2%{?commit:.git.%{commitnum}.%{?shortcommit}}%{?dist} Summary: Package dependency solver License: BSD @@ -183,8 +187,20 @@ Python 3 version. %{?with_complex_deps:-DENABLE_COMPLEX_DEPS=1} \ %{?with_perl_bindings:-DENABLE_PERL=ON} \ %{?with_ruby_bindings:-DENABLE_RUBY=ON} \ - %{?with_python2_bindings:-DENABLE_PYTHON=ON} \ - %{?with_python3_bindings:-DENABLE_PYTHON3=ON} \ +%if %{with python2_bindings} || %{with python3_bindings} + -DENABLE_PYTHON=ON \ +%if %{with python2_bindings} + -DPythonLibs_FIND_VERSION=%{python2_version} \ + -DPythonLibs_FIND_VERSION_MAJOR=2 \ +%if %{with python3_bindings} + -DENABLE_PYTHON3=ON \ + -DPYTHON3_EXECUTABLE=%{__python3} \ +%endif +%else + -DPythonLibs_FIND_VERSION=%{python3_version} \ + -DPythonLibs_FIND_VERSION_MAJOR=3 \ +%endif +%endif %{nil} %ninja_build -C "%{_vpath_builddir}" @@ -278,6 +294,9 @@ Python 3 version. %endif %changelog +* Mon Oct 01 2018 Igor Gnatenko - 0.6.35-2 +- Disable python2 subpackage + * Thu Aug 09 2018 Igor Gnatenko - 0.6.35-1 - Update to 0.6.35