Remove python2 packages
* resolves: rhbz#1737644 - libldb, libtalloc, libtevent, libtdb: Remove Python 2 subpackages from Fedora 31+
This commit is contained in:
parent
e931e68747
commit
bbde7fc49c
40
libtdb.spec
40
libtdb.spec
@ -2,20 +2,6 @@
|
|||||||
%global with_python3 1
|
%global with_python3 1
|
||||||
%endif
|
%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: libtdb
|
Name: libtdb
|
||||||
Version: 1.3.18
|
Version: 1.3.18
|
||||||
Release: 5%{?dist}
|
Release: 5%{?dist}
|
||||||
@ -32,14 +18,12 @@ Patch0003: 0003-wafsamba-Fix-few-SyntaxWarnings-caused-by-regular-ex.patch
|
|||||||
BuildRequires: gcc
|
BuildRequires: gcc
|
||||||
BuildRequires: libxslt
|
BuildRequires: libxslt
|
||||||
BuildRequires: docbook-style-xsl
|
BuildRequires: docbook-style-xsl
|
||||||
%if 0%{?with_python2}
|
|
||||||
BuildRequires: python2-devel
|
|
||||||
%endif
|
|
||||||
%if 0%{?with_python3}
|
%if 0%{?with_python3}
|
||||||
BuildRequires: python3-devel
|
BuildRequires: python3-devel
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
Provides: bundled(libreplace)
|
Provides: bundled(libreplace)
|
||||||
|
Obsoletes: python2-tdb < 1.4.2-1
|
||||||
|
|
||||||
%description
|
%description
|
||||||
A library that implements a trivial database.
|
A library that implements a trivial database.
|
||||||
@ -58,16 +42,6 @@ Requires: libtdb = %{version}-%{release}
|
|||||||
%description -n tdb-tools
|
%description -n tdb-tools
|
||||||
Tools to manage Tdb files
|
Tools to manage Tdb files
|
||||||
|
|
||||||
%if 0%{?with_python2}
|
|
||||||
%package -n python2-tdb
|
|
||||||
Summary: Python bindings for the Tdb library
|
|
||||||
Requires: libtdb = %{version}-%{release}
|
|
||||||
%{?python_provide:%python_provide python2-tdb}
|
|
||||||
|
|
||||||
%description -n python2-tdb
|
|
||||||
Python bindings for libtdb
|
|
||||||
%endif
|
|
||||||
|
|
||||||
%if 0%{?with_python3}
|
%if 0%{?with_python3}
|
||||||
%package -n python3-tdb
|
%package -n python3-tdb
|
||||||
Summary: Python3 bindings for the Tdb library
|
Summary: Python3 bindings for the Tdb library
|
||||||
@ -82,20 +56,16 @@ Python3 bindings for libtdb
|
|||||||
%autosetup -n tdb-%{version} -p1
|
%autosetup -n tdb-%{version} -p1
|
||||||
|
|
||||||
%build
|
%build
|
||||||
%{?export_waf_python}
|
|
||||||
%configure --disable-rpath \
|
%configure --disable-rpath \
|
||||||
--bundled-libraries=NONE \
|
--bundled-libraries=NONE \
|
||||||
--builtin-libraries=replace \
|
--builtin-libraries=replace
|
||||||
%{?extra_python}
|
|
||||||
|
|
||||||
make %{?_smp_mflags} V=1
|
make %{?_smp_mflags} V=1
|
||||||
|
|
||||||
%check
|
%check
|
||||||
%{?export_waf_python}
|
|
||||||
make %{?_smp_mflags} check
|
make %{?_smp_mflags} check
|
||||||
|
|
||||||
%install
|
%install
|
||||||
%{?export_waf_python}
|
|
||||||
make install DESTDIR=$RPM_BUILD_ROOT
|
make install DESTDIR=$RPM_BUILD_ROOT
|
||||||
|
|
||||||
%files
|
%files
|
||||||
@ -117,12 +87,6 @@ make install DESTDIR=$RPM_BUILD_ROOT
|
|||||||
%{_mandir}/man8/tdbtool.8*
|
%{_mandir}/man8/tdbtool.8*
|
||||||
%{_mandir}/man8/tdbrestore.8*
|
%{_mandir}/man8/tdbrestore.8*
|
||||||
|
|
||||||
%if 0%{?with_python2}
|
|
||||||
%files -n python2-tdb
|
|
||||||
%{python2_sitearch}/tdb.so
|
|
||||||
%{python2_sitearch}/_tdb_text.py*
|
|
||||||
%endif
|
|
||||||
|
|
||||||
%if 0%{?with_python3}
|
%if 0%{?with_python3}
|
||||||
%files -n python3-tdb
|
%files -n python3-tdb
|
||||||
%{python3_sitearch}/__pycache__/_tdb_text.cpython*.py[co]
|
%{python3_sitearch}/__pycache__/_tdb_text.cpython*.py[co]
|
||||||
|
Loading…
Reference in New Issue
Block a user