diff --git a/libguestfs.changes b/libguestfs.changes index f178929..6def7f9 100644 --- a/libguestfs.changes +++ b/libguestfs.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Mon Sep 4 19:15:25 UTC 2017 - cbosdonnat@suse.com + +- Tweak configuration before building for python3 or PyString_* + symbols will still be missing + ------------------------------------------------------------------- Thu Aug 31 15:25:06 UTC 2017 - cbosdonnat@suse.com diff --git a/libguestfs.spec b/libguestfs.spec index 755f159..9ead920 100644 --- a/libguestfs.spec +++ b/libguestfs.spec @@ -653,8 +653,16 @@ pushd python sed -i -e "s:libraries=:library_dirs=['$RPM_BUILD_ROOT/%{_libdir}'], libraries=:" setup.py make stamp-extra-files # Build needs libguestfs library to be installed -%python_build -%python_install + +# HACKY! Change config.h for python2 +echo '#define HAVE_PYSTRING_ASSTRING 1' >> config.h +%python2_build +%python2_install + +# HACKY! Change config.h for python3 +sed 's/\(#define HAVE_PYSTRING_ASSTRING 1\)/\/* \1 *\//' -i config.h +%python3_build +%python3_install popd %endif