Disable Python 2 bindings for Fedora >= 30
This commit is contained in:
parent
bbe076f720
commit
9b613a1ff4
@ -4,9 +4,16 @@
|
||||
%bcond_without python3
|
||||
%endif
|
||||
|
||||
# Do not build python2 bindings for RHEL > 7 and Fedora > 29
|
||||
%if 0%{?rhel} > 7 || 0%{?fedora} > 29
|
||||
%bcond_with python2
|
||||
%else
|
||||
%bcond_without python2
|
||||
%endif
|
||||
|
||||
Name: libcomps
|
||||
Version: 0.1.8
|
||||
Release: 14%{?dist}
|
||||
Release: 15%{?dist}
|
||||
Summary: Comps XML file manipulation library
|
||||
|
||||
License: GPLv2+
|
||||
@ -44,11 +51,12 @@ Documentation files for libcomps library.
|
||||
Summary: Documentation files for python bindings libcomps library
|
||||
Requires: %{name} = %{version}-%{release}
|
||||
BuildArch: noarch
|
||||
BuildRequires: python2-sphinx
|
||||
BuildRequires: python3-sphinx
|
||||
|
||||
%description -n python-%{name}-doc
|
||||
Documentation files for python bindings libcomps library.
|
||||
|
||||
%if %{with python2}
|
||||
%package -n python2-%{name}
|
||||
Summary: Python 2 bindings for libcomps library
|
||||
%{?python_provide:%python_provide python2-%{name}}
|
||||
@ -57,6 +65,7 @@ Requires: %{name}%{?_isa} = %{version}-%{release}
|
||||
|
||||
%description -n python2-%{name}
|
||||
Python 2 bindings for libcomps library.
|
||||
%endif
|
||||
|
||||
%if %{with python3}
|
||||
%package -n python3-%{name}
|
||||
@ -80,24 +89,28 @@ mkdir build-py3
|
||||
%endif
|
||||
|
||||
%build
|
||||
%if %{with python2}
|
||||
pushd build
|
||||
%cmake ../libcomps/ -DPYTHON_DESIRED:STRING=2
|
||||
%make_build
|
||||
make %{?_smp_mflags} docs
|
||||
make %{?_smp_mflags} pydocs
|
||||
popd
|
||||
%endif
|
||||
|
||||
%if %{with python3}
|
||||
pushd build-py3
|
||||
%cmake ../libcomps/ -DPYTHON_DESIRED:STRING=3
|
||||
%make_build
|
||||
make %{?_smp_mflags} docs
|
||||
make %{?_smp_mflags} pydocs
|
||||
popd
|
||||
%endif
|
||||
|
||||
%install
|
||||
%if %{with python2}
|
||||
pushd build
|
||||
%make_install
|
||||
popd
|
||||
%endif
|
||||
|
||||
%if %{with python3}
|
||||
pushd build-py3
|
||||
@ -106,9 +119,11 @@ popd
|
||||
%endif
|
||||
|
||||
%check
|
||||
%if %{with python2}
|
||||
pushd build
|
||||
make test
|
||||
popd
|
||||
%endif
|
||||
%if %{with python3}
|
||||
pushd build-py3
|
||||
make pytest
|
||||
@ -127,13 +142,15 @@ popd
|
||||
%{_includedir}/%{name}/
|
||||
|
||||
%files doc
|
||||
%doc build/docs/libcomps-doc/html
|
||||
%doc build-py3/docs/libcomps-doc/html
|
||||
|
||||
%files -n python-%{name}-doc
|
||||
%doc build/src/python/docs/html
|
||||
%doc build-py3/src/python/docs/html
|
||||
|
||||
%if %{with python2}
|
||||
%files -n python2-%{name}
|
||||
%{python2_sitearch}/%{name}/
|
||||
%endif
|
||||
|
||||
%if %{with python3}
|
||||
%files -n python3-%{name}
|
||||
@ -141,6 +158,9 @@ popd
|
||||
%endif
|
||||
|
||||
%changelog
|
||||
* Tue Nov 27 2018 Marek Blaha <mblaha@redhat.com> - 0.1.8-15
|
||||
- Disable Python 2 bindings for Fedora >= 30
|
||||
|
||||
* Fri Jul 13 2018 Fedora Release Engineering <releng@fedoraproject.org> - 0.1.8-14
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user