Use %bcond_without python3
This commit is contained in:
parent
3a0fc87015
commit
adebf43374
16
libldb.spec
16
libldb.spec
@ -10,7 +10,9 @@
|
||||
%endif
|
||||
|
||||
%if 0%{?fedora} || 0%{?rhel} > 7
|
||||
%global with_python3 1
|
||||
%bcond_without python3
|
||||
%else
|
||||
%bcond_with python3
|
||||
%endif
|
||||
|
||||
%global talloc_version 2.3.1
|
||||
@ -44,11 +46,12 @@ BuildRequires: lmdb-devel >= 0.9.16
|
||||
BuildRequires: popt-devel
|
||||
BuildRequires: libxslt
|
||||
BuildRequires: docbook-style-xsl
|
||||
%if 0%{?with_python3}
|
||||
%if %{with python3}
|
||||
BuildRequires: python3-devel
|
||||
BuildRequires: python3-tdb
|
||||
BuildRequires: python3-talloc-devel
|
||||
BuildRequires: python3-tevent
|
||||
#endif with python
|
||||
%endif
|
||||
BuildRequires: doxygen
|
||||
BuildRequires: openldap-devel
|
||||
@ -92,7 +95,7 @@ Provides: pyldb-devel%{?_isa} = %{version}-%{release}
|
||||
Development files for the Python bindings for the LDB library.
|
||||
This package includes files that aren't specific to a Python version.
|
||||
|
||||
%if 0%{?with_python3}
|
||||
%if %{with python3}
|
||||
%package -n python3-ldb
|
||||
Summary: Python bindings for the LDB library
|
||||
Requires: libldb%{?_isa} = %{version}-%{release}
|
||||
@ -112,6 +115,7 @@ Requires: python-ldb-devel-common%{?_isa} = %{version}-%{release}
|
||||
|
||||
%description -n python3-ldb-devel
|
||||
Development files for the Python bindings for the LDB library
|
||||
#endif with python
|
||||
%endif
|
||||
|
||||
%prep
|
||||
@ -209,7 +213,7 @@ rm -f $RPM_BUILD_ROOT/%{_mandir}/man3/_*
|
||||
%{_includedir}/pyldb.h
|
||||
%{_mandir}/man*/Py*.gz
|
||||
|
||||
%if 0%{?with_python3}
|
||||
%if %{with python3}
|
||||
%files -n python3-ldb
|
||||
%{python3_sitearch}/ldb.cpython-*.so
|
||||
%{_libdir}/libpyldb-util.cpython-*.so.2*
|
||||
@ -221,9 +225,13 @@ rm -f $RPM_BUILD_ROOT/%{_mandir}/man3/_*
|
||||
%{_libdir}/pkgconfig/pyldb-util.cpython-*.pc
|
||||
|
||||
%ldconfig_scriptlets -n python3-ldb
|
||||
#endif with python
|
||||
%endif
|
||||
|
||||
%changelog
|
||||
* Tue Oct 27 2020 Andreas Schneider <asn@redhat.com> - 2.2.0-6
|
||||
- Spec file cleanup and improvements
|
||||
|
||||
* Thu Oct 22 2020 Alexander Bokovoy <abokovoy@redhat.com> - 2.2.0-5
|
||||
- Rebuild for Python 3.9
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user