Hello community, here is the log from the commit of package python3-cairo for openSUSE:Factory checked in at 2015-10-28 17:17:10 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/python3-cairo (Old) and /work/SRC/openSUSE:Factory/.python3-cairo.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python3-cairo" Changes: -------- --- /work/SRC/openSUSE:Factory/python3-cairo/python3-cairo.changes 2015-01-23 15:45:55.000000000 +0100 +++ /work/SRC/openSUSE:Factory/.python3-cairo.new/python3-cairo.changes 2015-10-28 17:17:11.000000000 +0100 @@ -1,0 +2,16 @@ +Wed Oct 21 10:27:24 UTC 2015 - [email protected] + +- Add pycairo-1.10.0-80_fix-pickle.patch and + pycairo-1.10.0-81_pickling-again.patch + These fix pickling issues in the bundled waf buildsystem on + python 3.5. + These patches are being used in various other distros, + including gentoo, debian, abd ubuntu. + See: + https://bugs.freedesktop.org/show_bug.cgi?id=91561 + https://gitweb.gentoo.org/repo/gentoo.git/tree/dev-python/pycairo/files/pycairo-1.10.0-80_fix-pickle.patch + https://gitweb.gentoo.org/repo/gentoo.git/tree/dev-python/pycairo/files/pycairo-1.10.0-81_pickling-again.patch +- Reformat waf-py34.patch +- Improve waf patching process + +------------------------------------------------------------------- New: ---- pycairo-1.10.0-80_fix-pickle.patch pycairo-1.10.0-81_pickling-again.patch ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ python3-cairo.spec ++++++ --- /var/tmp/diff_new_pack.iXAiwf/_old 2015-10-28 17:17:12.000000000 +0100 +++ /var/tmp/diff_new_pack.iXAiwf/_new 2015-10-28 17:17:12.000000000 +0100 @@ -27,7 +27,11 @@ # FIXME: on update, check if we still need to manually remove the byte-code in %%install Url: http://www.cairographics.org/ Source: %{modname}-%{version}.tar.bz2 -Source1: waf-py34.patch +Patch1: waf-py34.patch +# PATCH-FIX-UPSTREAM pycairo-1.10.0-80_fix-pickle.patch bfo#91561 - Fix waf pickling on Python 3.5 +Patch10: pycairo-1.10.0-80_fix-pickle.patch +# PATCH-FIX-UPSTREAM pycairo-1.10.0-81_pickling-again.patch bfo#91561 - Further waf pickling on Python 3.5 +Patch11: pycairo-1.10.0-81_pickling-again.patch BuildRequires: cairo-devel # Needed to have the modules for different hash algorithms; python3-devel only brings in python3-base BuildRequires: python3 @@ -51,15 +55,22 @@ %prep %setup -q -n %{modname}-%{version} +# Patch bundled-in waf. +# First, run waf to extract its library. +PYTHON=python3 python3 waf --help > /dev/null + +# Second, enter the extracted directory to do the patches. +# The directory name depends on the exact waf version, +# which we don't know ahead-of-time, so we can't put it +# in the patch directly. +pushd .waf3-* +%patch1 -p1 +%patch10 -p1 +%patch11 -p1 +popd + %build export PYTHON=python3 -# an extremely crude way to patch the bundled-in version of waf. sorry. -# first run waf to extract its library -python3 waf --help > /dev/null -# find and patch the file -find -path "*/Tools/python.py" -exec patch -i %{S:1} {} ";" -# continue with build - python3 ./waf configure --prefix=%{_prefix} --libdir=%{_libdir} python3 ./waf build ++++++ pycairo-1.10.0-80_fix-pickle.patch ++++++ Description: During the build process, a Context instance is pickled, or at least attempted to be. This fails because self.node_class is assigned to a class which is nested inside the __init__() method. Because Python cannot find this class at unpickling time (i.e. it cannot be imported), Python refuses to pickle the Context instance, leading to a FTBFS. Since there's no obvious reason why the class has to be so nested, moving it to a module global solves the build failure. Author: Barry Warsaw <[email protected]> Bug: https://bugs.freedesktop.org/show_bug.cgi?id=91561 --- a/waflib/Context.py +++ b/waflib/Context.py @@ -51,6 +51,8 @@ global classes classes.insert(0,cls) ctx=store_context('ctx',(object,),{}) +class node_class(waflib.Node.Node): + pass class Context(ctx): errors=Errors tools={} @@ -60,8 +62,6 @@ except KeyError: global run_dir rd=run_dir - class node_class(waflib.Node.Node): - pass self.node_class=node_class self.node_class.__module__="waflib.Node" self.node_class.__name__="Nod3" ++++++ pycairo-1.10.0-81_pickling-again.patch ++++++ Description: Follow up to 80_fix-pickle.patch. Just disable pickling altogether since the previous patch doesn't really fix the problem, and not storing the pickle seems to have no adverse effects on the build, while avoiding the observed traceback. Author: Barry Warsaw <[email protected]> Forwarded: no --- a/waflib/Build.py +++ b/waflib/Build.py @@ -151,6 +151,7 @@ f.close() self.init_dirs() def store(self): + return data={} for x in SAVED_ATTRS: data[x]=getattr(self,x) --- a/waflib/Context.py +++ b/waflib/Context.py @@ -51,8 +51,6 @@ global classes classes.insert(0,cls) ctx=store_context('ctx',(object,),{}) -class node_class(waflib.Node.Node): - pass class Context(ctx): errors=Errors tools={} @@ -62,6 +60,8 @@ except KeyError: global run_dir rd=run_dir + class node_class(waflib.Node.Node): + pass self.node_class=node_class self.node_class.__module__="waflib.Node" self.node_class.__name__="Nod3" ++++++ waf-py34.patch ++++++ --- /var/tmp/diff_new_pack.iXAiwf/_old 2015-10-28 17:17:12.000000000 +0100 +++ /var/tmp/diff_new_pack.iXAiwf/_new 2015-10-28 17:17:12.000000000 +0100 @@ -1,5 +1,5 @@ ---- python.py.orig 2014-02-10 17:21:55.822478906 +0100 -+++ python.py 2011-03-30 08:17:51.000000000 +0200 +--- a/waflib/Tools/python.py 2014-02-10 17:21:55.822478906 +0100 ++++ b/waflib/Tools/python.py 2011-03-30 08:17:51.000000000 +0200 @@ -169,7 +169,7 @@ conf.find_program('python-config-%s'%num,var='PYTHON_CONFIG',mandatory=False) includes=[]
