diff options
author | Mark H Weaver <mhw@netris.org> | 2019-03-18 21:39:12 -0400 |
---|---|---|
committer | Mark H Weaver <mhw@netris.org> | 2019-03-20 18:20:36 -0400 |
commit | 8b672b2c48164c78731ae142ae4761d91666bdec (patch) | |
tree | 4e5ccad6043e39d50655fe548dbcc2027de39441 /gnu/packages/patches/blender-2.79-python-3.7-fix.patch | |
parent | 933cc19684327a1cbe7cc45d1bf7bf7b327bf288 (diff) | |
download | guix-8b672b2c48164c78731ae142ae4761d91666bdec.tar guix-8b672b2c48164c78731ae142ae4761d91666bdec.tar.gz |
gnu: blender: Restore version 2.79b for systems without OpenGL 3.
Fixes <https://bugs.gnu.org/33882>.
* gnu/packages/graphics.scm (blender-2.79): New variable.
(blender)[description]: Remove obsolete claim that the stable
release no longer works in Guix.
* gnu/packages/patches/blender-2.79-newer-ffmpeg.patch,
gnu/packages/patches/blender-2.79-python-3.7-fix.patch: New files.
* gnu/local.mk (dist_patch_DATA): Add them.
Diffstat (limited to 'gnu/packages/patches/blender-2.79-python-3.7-fix.patch')
-rw-r--r-- | gnu/packages/patches/blender-2.79-python-3.7-fix.patch | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/gnu/packages/patches/blender-2.79-python-3.7-fix.patch b/gnu/packages/patches/blender-2.79-python-3.7-fix.patch new file mode 100644 index 0000000000..fd1d8ba437 --- /dev/null +++ b/gnu/packages/patches/blender-2.79-python-3.7-fix.patch @@ -0,0 +1,43 @@ +Copied from https://git.blender.org/gitweb/gitweb.cgi/blender.git/patch/1db47a2ccd1e68994bf8140eba6cc2a26a2bc91f +Fixes <https://bugs.gnu.org/33608>. + +From 1db47a2ccd1e68994bf8140eba6cc2a26a2bc91f Mon Sep 17 00:00:00 2001 +From: Campbell Barton <ideasman42@gmail.com> +Date: Thu, 12 Jul 2018 08:28:06 +0200 +Subject: [PATCH] Fix PyRNA class registration w/ Python 3.7 + +In Python3.7 this now raises an error. +--- + source/blender/python/intern/bpy_rna.c | 5 +++++ + 1 file changed, 5 insertions(+) + +diff --git a/source/blender/python/intern/bpy_rna.c b/source/blender/python/intern/bpy_rna.c +index 9052b6f580a..80b0aa7a51b 100644 +--- a/source/blender/python/intern/bpy_rna.c ++++ b/source/blender/python/intern/bpy_rna.c +@@ -7577,10 +7577,12 @@ static int bpy_class_validate_recursive(PointerRNA *dummyptr, StructRNA *srna, v + if (!(flag & PROP_REGISTER)) + continue; + ++ /* TODO(campbell): Use Python3.7x _PyObject_LookupAttr(), also in the macro below. */ + identifier = RNA_property_identifier(prop); + item = PyObject_GetAttrString(py_class, identifier); + + if (item == NULL) { ++ PyErr_Clear(); + /* Sneaky workaround to use the class name as the bl_idname */ + + #define BPY_REPLACEMENT_STRING(rna_attr, py_attr) \ +@@ -7596,6 +7598,9 @@ static int bpy_class_validate_recursive(PointerRNA *dummyptr, StructRNA *srna, v + } \ + Py_DECREF(item); \ + } \ ++ else { \ ++ PyErr_Clear(); \ ++ } \ + } /* intentionally allow else here */ + + if (false) {} /* needed for macro */ +-- +2.20.1 + |