From 3117620bc16e07010ccc76e2e99a049c6d770b4b3d0208bee024953bd3e7c7a9 Mon Sep 17 00:00:00 2001 From: Greg Freemyer Date: Tue, 5 May 2020 23:24:19 +0000 Subject: [PATCH] Accepting request 800340 from home:dimstar:Factory - Allow distros to disable python2 builds (bcond_withou python2): Tumbleweed already declares this, as python2 is EOL. OBS-URL: https://build.opensuse.org/request/show/800340 OBS-URL: https://build.opensuse.org/package/show/security:forensics/libolecf?expand=0&rev=15 --- libolecf.changes | 6 ++++++ libolecf.spec | 11 ++++++++++- 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/libolecf.changes b/libolecf.changes index bf27c11..71cbbe7 100644 --- a/libolecf.changes +++ b/libolecf.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Tue May 5 11:19:09 UTC 2020 - Dominique Leuenberger + +- Allow distros to disable python2 builds (bcond_withou python2): + Tumbleweed already declares this, as python2 is EOL. + ------------------------------------------------------------------- Wed Apr 15 03:27:43 UTC 2020 - Greg Freemyer diff --git a/libolecf.spec b/libolecf.spec index cdc12fd..00afa05 100644 --- a/libolecf.spec +++ b/libolecf.spec @@ -16,6 +16,7 @@ # +%bcond_without python2 Name: libolecf %define lname libolecf1 %define timestamp 20191221 @@ -111,7 +112,13 @@ Python bindings for libolecf, which can read MS IE cache files. cp "%SOURCE2" . %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 @@ -141,11 +148,13 @@ find %buildroot -name '*.la' -delete %_libdir/pkgconfig/libolecf.pc %_mandir/man3/libolecf.3* +%if %{with python2} %files -n python2-%name %defattr(-,root,root) %doc AUTHORS README %license COPYING %python2_sitearch/pyolecf.so +%endif %files -n python3-%name %defattr(-,root,root)