diff --git a/swig.spec b/swig.spec index 776bb06..1e6db3b 100644 --- a/swig.spec +++ b/swig.spec @@ -7,6 +7,7 @@ # Disable PHP tests, because they fail with PHP 7.2.0 %{!?phplang:%global phplang 0} %{!?rubylang:%global rubylang 1} +%{!?python2lang:%global python2lang 0} %if 0%{?rhel} %{!?golang:%global golang 0} @@ -33,7 +34,7 @@ Summary: Connects C/C++/Objective C to some high-level programming languages Name: swig Version: 3.0.12 -Release: 17%{?dist} +Release: 18%{?dist} License: GPLv3+ and BSD URL: http://swig.sourceforge.net/ Source0: http://downloads.sourceforge.net/project/swig/swig/swig-%{version}/swig-%{version}.tar.gz @@ -62,7 +63,10 @@ Patch9: swig-3.0.12-Coverity-fix-issue-reported-for-wrapper-argument-che.patch Patch10: swig-3.0.12-Coverity-fix-issue-reported-for-SWIG_Python_ConvertF.patch BuildRequires: perl-interpreter, pcre-devel -BuildRequires: python2-devel, python3-devel +%if %{python2lang} +BuildRequires: python2-devel +%endif +BuildRequires: python3-devel BuildRequires: autoconf, automake, gawk, dos2unix BuildRequires: gcc-c++ BuildRequires: help2man @@ -180,6 +184,12 @@ done # It causes that log had more then 600M. %configure \ --without-ocaml \ +%if %{python2lang} + --with-python=%__python2\ +%else + --without-python \ +%endif + --with-python3=%__python3 \ %if %{phplang} --with-php=%{__php} \ %endif @@ -322,6 +332,9 @@ install -pm 644 Tools/swig.gdb %{buildroot}%{_datadir}/%{name}/gdb %{_datadir}/%{name}/gdb %changelog +* Fri Jun 22 2018 Jitka Plesnikova - 3.0.12-18 +- Disable using of Python 2 + * Tue Apr 24 2018 Jitka Plesnikova - 3.0.12-17 - Backport upstream Coverity fixes (bug#1570037) - Do not build ccache-swig on RHEL