Remove python2 packages
* resolves: rhbz#1737644 - libldb, libtalloc, libtevent, libtdb: Remove Python 2 subpackages from Fedora 31+
This commit is contained in:
parent
ba321676cb
commit
33dafe436a
@ -2,20 +2,6 @@
|
||||
%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
|
||||
|
||||
Name: libtalloc
|
||||
Version: 2.1.16
|
||||
Release: 5%{?dist}
|
||||
@ -32,15 +18,14 @@ Patch0003: 0003-wafsamba-Fix-few-SyntaxWarnings-caused-by-regular-ex.patch
|
||||
BuildRequires: gcc
|
||||
BuildRequires: libxslt
|
||||
BuildRequires: docbook-style-xsl
|
||||
%if 0%{?with_python2}
|
||||
BuildRequires: python2-devel
|
||||
%endif
|
||||
%if 0%{?with_python3}
|
||||
BuildRequires: python3-devel
|
||||
%endif
|
||||
BuildRequires: doxygen
|
||||
|
||||
Provides: bundled(libreplace)
|
||||
Obsoletes: python2-talloc < 2.2.0-1
|
||||
Obsoletes: python2-talloc-devel < 2.2.0-1
|
||||
|
||||
%description
|
||||
A library that implements a hierarchical allocator with destructors.
|
||||
@ -52,30 +37,6 @@ Requires: libtalloc = %{version}-%{release}
|
||||
%description devel
|
||||
Header files needed to develop programs that link against the Talloc library.
|
||||
|
||||
%if 0%{?with_python2}
|
||||
%package -n python2-talloc
|
||||
Summary: Python bindings for the Talloc library
|
||||
Requires: libtalloc = %{version}-%{release}
|
||||
Provides: pytalloc%{?_isa} = %{version}-%{release}
|
||||
Provides: pytalloc = %{version}-%{release}
|
||||
Obsoletes: pytalloc < 2.1.3
|
||||
%{?python_provide:%python_provide python2-talloc}
|
||||
|
||||
%description -n python2-talloc
|
||||
Python 2 libraries for creating bindings using talloc
|
||||
|
||||
%package -n python2-talloc-devel
|
||||
Summary: Development libraries for python2-talloc
|
||||
Requires: python2-talloc = %{version}-%{release}
|
||||
Provides: pytalloc-devel%{?_isa} = %{version}-%{release}
|
||||
Provides: pytalloc-devel = %{version}-%{release}
|
||||
Obsoletes: pytalloc-devel < 2.1.3
|
||||
%{?python_provide:%python_provide python2-talloc-devel}
|
||||
|
||||
%description -n python2-talloc-devel
|
||||
Development libraries for python2-talloc
|
||||
%endif
|
||||
|
||||
%if 0%{?with_python3}
|
||||
%package -n python3-talloc
|
||||
Summary: Python bindings for the Talloc library
|
||||
@ -101,23 +62,19 @@ Development libraries for python3-talloc
|
||||
# workaround for https://bugzilla.redhat.com/show_bug.cgi?id=1217376
|
||||
export python_LDFLAGS=""
|
||||
|
||||
%{?export_waf_python}
|
||||
%configure --disable-rpath \
|
||||
--disable-rpath-install \
|
||||
--bundled-libraries=NONE \
|
||||
--builtin-libraries=replace \
|
||||
--disable-silent-rules \
|
||||
%{?extra_python}
|
||||
--disable-silent-rules
|
||||
|
||||
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
|
||||
@ -133,17 +90,6 @@ cp -a doc/man/* $RPM_BUILD_ROOT/%{_mandir}
|
||||
%{_mandir}/man3/talloc*.3.gz
|
||||
%{_mandir}/man3/libtalloc*.3.gz
|
||||
|
||||
%if 0%{?with_python2}
|
||||
%files -n python2-talloc
|
||||
%{_libdir}/libpytalloc-util.so.*
|
||||
%{python2_sitearch}/talloc.so
|
||||
|
||||
%files -n python2-talloc-devel
|
||||
%{_includedir}/pytalloc.h
|
||||
%{_libdir}/pkgconfig/pytalloc-util.pc
|
||||
%{_libdir}/libpytalloc-util.so
|
||||
%endif
|
||||
|
||||
%if 0%{?with_python3}
|
||||
%files -n python3-talloc
|
||||
%{_libdir}/libpytalloc-util.cpython*.so.*
|
||||
@ -157,10 +103,6 @@ cp -a doc/man/* $RPM_BUILD_ROOT/%{_mandir}
|
||||
|
||||
%ldconfig_scriptlets
|
||||
|
||||
%if 0%{?with_python2}
|
||||
%ldconfig_scriptlets -n python2-talloc
|
||||
%endif
|
||||
|
||||
%if 0%{?with_python3}
|
||||
%ldconfig_scriptlets -n python3-talloc
|
||||
%endif
|
||||
|
||||
Loading…
Reference in New Issue
Block a user