From 569c925f836d6986b37f186db942df51a38f3cccec394982f8a073853eece6a6 Mon Sep 17 00:00:00 2001 From: Greg Freemyer Date: Tue, 5 May 2020 23:20:22 +0000 Subject: [PATCH] Accepting request 800334 from home:dimstar:Factory - Allow distros to decide to no longer build python2 bindings (bcond_without python2). Tumbleweed declares this already. OBS-URL: https://build.opensuse.org/request/show/800334 OBS-URL: https://build.opensuse.org/package/show/security:forensics/libesedb?expand=0&rev=13 --- libesedb.changes | 6 ++++++ libesedb.spec | 14 +++++++++++++- 2 files changed, 19 insertions(+), 1 deletion(-) diff --git a/libesedb.changes b/libesedb.changes index 8d9267a..d1c51a1 100644 --- a/libesedb.changes +++ b/libesedb.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Tue May 5 11:03:08 UTC 2020 - Dominique Leuenberger + +- Allow distros to decide to no longer build python2 bindings + (bcond_without python2). Tumbleweed declares this already. + ------------------------------------------------------------------- Tue Apr 7 15:32:21 UTC 2020 - Greg Freemyer diff --git a/libesedb.spec b/libesedb.spec index a340779..11af396 100644 --- a/libesedb.spec +++ b/libesedb.spec @@ -16,6 +16,8 @@ # +%bcond_without python2 + %define lname libesedb1 %define timestamp 20191220 Name: libesedb @@ -32,7 +34,9 @@ Source4: Forensic_analysis_of_the_Windows_Search_database.pdf Source5: Windows_Search.pdf Source6: libesedb-libfdata.pdf BuildRequires: pkg-config +%if %{with python2} BuildRequires: python-devel +%endif BuildRequires: pkgconfig(libbfio) >= 20130721 BuildRequires: pkgconfig(libcdata) >= 20140105 BuildRequires: pkgconfig(libcerror) >= 20140105 @@ -133,7 +137,13 @@ cp "%{SOURCE5}" . cp "%{SOURCE6}" . %build -%configure --disable-static --enable-wide-character-type --enable-python2 --enable-python3 +%configure \ + --disable-static \ + --enable-wide-character-type \ +%if %{with python2} + --enable-python2 \ +%endif + --enable-python3 make %{?_smp_mflags} %install @@ -172,11 +182,13 @@ find %{buildroot} -type f -name "*.la" -delete -print %{_libdir}/pkgconfig/libesedb.pc %{_mandir}/man3/libesedb.3* +%if %{with python2} %files -n python2-%{name} %defattr(-,root,root) %doc AUTHORS README ChangeLog %license COPYING %{python2_sitearch}/pyesedb.so +%endif %files -n python3-%{name} %defattr(-,root,root)