From 685f47c762acc719d4d7494cacff41bd6346cccded47a789b0a695c15eb94002 Mon Sep 17 00:00:00 2001 From: Olaf Hering Date: Mon, 19 Jul 2021 09:02:47 +0000 Subject: [PATCH] - Remove obsolete yajl - Add conditional to ocaml_preserve_bytecode - Remove traces of python2 code - Use pkgconfig(python3) to refer to variants of python3 OBS-URL: https://build.opensuse.org/package/show/Virtualization/libguestfs?expand=0&rev=474 --- libguestfs.changes | 8 ++++++++ libguestfs.spec | 18 +++++------------- 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/libguestfs.changes b/libguestfs.changes index d9a0f16..9a3fc9b 100644 --- a/libguestfs.changes +++ b/libguestfs.changes @@ -1,3 +1,11 @@ +------------------------------------------------------------------- +Mon Jul 19 01:01:01 UTC 2021 - ohering@suse.de + +- Remove obsolete yajl +- Add conditional to ocaml_preserve_bytecode +- Remove traces of python2 code +- Use pkgconfig(python3) to refer to variants of python3 + ------------------------------------------------------------------- Fri May 28 10:20:30 UTC 2021 - ohering@suse.de diff --git a/libguestfs.spec b/libguestfs.spec index 88f4b94..a7d76f2 100644 --- a/libguestfs.spec +++ b/libguestfs.spec @@ -20,7 +20,7 @@ Version: 1.44.1 Release: 0 -%{ocaml_preserve_bytecode} +%{?ocaml_preserve_bytecode} %bcond_without ocaml_bindings %bcond_without lua_bindings @@ -102,12 +102,11 @@ BuildRequires: dhcp-client BuildRequires: libjansson-devel BuildRequires: pcre-devel BuildRequires: pkg-config -BuildRequires: python3-devel +BuildRequires: pkgconfig(python3) BuildRequires: qemu-tools BuildRequires: readline-devel BuildRequires: supermin >= 5.1.6 BuildRequires: pkgconfig(dbus-1) -BuildRequires: pkgconfig(yajl) >= 2.0.4 # Required to build tools, its independent from bindings BuildRequires: glib2-devel BuildRequires: ocaml >= 4.01 @@ -310,8 +309,7 @@ Allows lua scripts to directly use libguestfs. Summary: Python 3 bindings for libguestfs License: GPL-2.0-only Group: Development/Languages/Python -BuildRequires: python3 -BuildRequires: python3-devel +BuildRequires: pkgconfig(python3) %define _configure_python --enable-python # Obsoletes: libguestfs-python < %{version} @@ -569,13 +567,6 @@ autoreconf -fi %configure \ --help || : -if python --version && ! pkg-config python -then - export PYTHON_LIBS="-lpython`python -c 'import distutils.sysconfig; print (distutils.sysconfig.get_python_version ());'`" - export PYTHON_CFLAGS="-I`python -c 'import distutils.sysconfig; print (distutils.sysconfig.get_python_inc ());'`" - export PYTHON_EXT_SUFFIX=.so -fi - # Defines these if using --with-distro=SUSE with configure export HAVE_RPM_TRUE= export HAVE_RPM_FALSE="#" @@ -657,7 +648,8 @@ sed -i -e "s:libraries=:library_dirs=['%{buildroot}/%{_libdir}'], libraries=:" s make stamp-extra-files # HACKY! Change config.h for python3 -sed 's/\(#define HAVE_PYSTRING_ASSTRING 1\)/\/* \1 *\//' -i config.h +sed 's/\(#define HAVE_PYSTRING_ASSTRING 1\)/\/* \1 *\//' -i~ config.h +diff -u "$_"~ "$_" && : equal %python3_build %python3_install popd