From b843753ad56a89035faeeb94dbeb39060c0c9630 Mon Sep 17 00:00:00 2001 From: Brecht Van Lommel Date: Wed, 11 Jul 2018 21:30:37 +0200 Subject: [PATCH 1/2] Buildbot: initial configuration for Visual Studio 2017. --- build_files/buildbot/slave_compile.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/build_files/buildbot/slave_compile.py b/build_files/buildbot/slave_compile.py index ff19bcce758..c43bb88b270 100644 --- a/build_files/buildbot/slave_compile.py +++ b/build_files/buildbot/slave_compile.py @@ -78,7 +78,13 @@ if 'cmake' in builder: # cmake_extra_options.append('-DCUDA_NVCC_EXECUTABLE=/usr/local/cuda-hack/nvcc') elif builder.startswith('win'): - if builder.endswith('_vc2015'): + if builder.endswith('_vc2017'): + if builder.startswith('win64'): + cmake_options.extend(['-G', 'Visual Studio 15 2017 Win64']) + elif builder.startswith('win32'): + bits = 32 + cmake_options.extend(['-G', 'Visual Studio 15 2017']) + elif builder.endswith('_vc2015'): if builder.startswith('win64'): cmake_options.extend(['-G', 'Visual Studio 14 2015 Win64']) elif builder.startswith('win32'): From 1db47a2ccd1e68994bf8140eba6cc2a26a2bc91f Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Thu, 12 Jul 2018 08:28:06 +0200 Subject: [PATCH 2/2] 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 */