Remove python2 packages
* resolves: rhbz#1737644 - libldb, libtalloc, libtevent, libtdb: Remove Python 2 subpackages from Fedora 31+
This commit is contained in:
parent
b9cac9a79e
commit
de6a121b04
@ -1,23 +1,7 @@
|
||||
%{!?python2_sitearch: %global python2_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib(1))")}
|
||||
|
||||
%if 0%{?fedora} || 0%{?rhel} > 7
|
||||
%global with_python3 1
|
||||
%endif
|
||||
|
||||
%if 0%{?fedora} || 0%{?rhel} < 8
|
||||
%global with_python2 1
|
||||
%endif
|
||||
|
||||
%if (0%{?with_python2} == 1 && 0%{?with_python3} == 0)
|
||||
# We need to sent env PYTHON for python2 only build
|
||||
%global export_waf_python export PYTHON=%{__python2}
|
||||
%endif
|
||||
|
||||
%if (0%{?with_python2} == 1 && 0%{?with_python3} == 1)
|
||||
# python3 is default and therefore python2 need to be set as extra-python
|
||||
%global extra_python --extra-python=%{__python2}
|
||||
%endif
|
||||
|
||||
%global talloc_version 2.1.16
|
||||
|
||||
Name: libtevent
|
||||
@ -38,16 +22,13 @@ BuildRequires: libtalloc-devel >= %{talloc_version}
|
||||
BuildRequires: doxygen
|
||||
BuildRequires: docbook-style-xsl
|
||||
BuildRequires: libxslt
|
||||
%if 0%{?with_python2}
|
||||
BuildRequires: python2-devel
|
||||
BuildRequires: python2-talloc-devel >= %{talloc_version}
|
||||
%endif
|
||||
%if 0%{?with_python3}
|
||||
BuildRequires: python3-devel
|
||||
BuildRequires: python3-talloc-devel >= %{talloc_version}
|
||||
%endif
|
||||
|
||||
Provides: bundled(libreplace)
|
||||
Obsoletes: python2-tevent < 0.10.0-1
|
||||
|
||||
%description
|
||||
Tevent is an event system based on the talloc memory management library.
|
||||
@ -65,17 +46,6 @@ Requires: libtalloc-devel%{?_isa} >= %{talloc_version}
|
||||
Header files needed to develop programs that link against the Tevent library.
|
||||
|
||||
|
||||
%if 0%{?with_python2}
|
||||
%package -n python2-tevent
|
||||
Summary: Python bindings for the Tevent library
|
||||
Requires: libtevent%{?_isa} = %{version}-%{release}
|
||||
|
||||
%{?python_provide:%python_provide python2-tevent}
|
||||
|
||||
%description -n python2-tevent
|
||||
Python bindings for libtevent
|
||||
%endif
|
||||
|
||||
%if 0%{?with_python3}
|
||||
%package -n python3-tevent
|
||||
Summary: Python 3 bindings for the Tevent library
|
||||
@ -91,22 +61,18 @@ Python 3 bindings for libtevent
|
||||
%autosetup -n tevent-%{version} -p1
|
||||
|
||||
%build
|
||||
%{?export_waf_python}
|
||||
%configure --disable-rpath \
|
||||
--bundled-libraries=NONE \
|
||||
--builtin-libraries=replace \
|
||||
%{?extra_python}
|
||||
--builtin-libraries=replace
|
||||
|
||||
make %{?_smp_mflags} V=1
|
||||
|
||||
doxygen doxy.config
|
||||
|
||||
%check
|
||||
%{?export_waf_python}
|
||||
make %{?_smp_mflags} check
|
||||
|
||||
%install
|
||||
%{?export_waf_python}
|
||||
make install DESTDIR=$RPM_BUILD_ROOT
|
||||
|
||||
# Install API docs
|
||||
@ -123,12 +89,6 @@ cp -a doc/man/* $RPM_BUILD_ROOT/%{_mandir}
|
||||
%{_libdir}/pkgconfig/tevent.pc
|
||||
%{_mandir}/man3/tevent*.gz
|
||||
|
||||
%if 0%{?with_python2}
|
||||
%files -n python2-tevent
|
||||
%{python2_sitearch}/tevent.py*
|
||||
%{python2_sitearch}/_tevent.so
|
||||
%endif
|
||||
|
||||
%if 0%{?with_python3}
|
||||
%files -n python3-tevent
|
||||
%{python3_sitearch}/tevent.py
|
||||
|
||||
Loading…
Reference in New Issue
Block a user