[Bf-committers] [Bf-blender-cvs] SVN commit: /data/svn/bf-blender [51906] trunk/blender: default to Python3. 3 on Linux for SCons and CMake, warn when building with python 3. 2x or older.

Thomas Dinges blender at dingto.org
Mon Nov 5 15:30:39 CET 2012


Hey,
d:\blender_dev\code\trunk\source\blender\python\intern\bpy_util.h(36) : 
fatal er
ror C1021: Ungültiger Präprozessorbefehl "warning".

warning is not recognized on msvc.

Regards,
Thomas

Am 05.11.2012 14:48, schrieb Campbell Barton:
> Revision: 51906
>            http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=51906
> Author:   campbellbarton
> Date:     2012-11-05 13:48:42 +0000 (Mon, 05 Nov 2012)
> Log Message:
> -----------
> default to Python3.3 on Linux for SCons and CMake, warn when building with python 3.2x or older.
>
> also remove casts to keep Python3.2 warning quiet.
>
> Modified Paths:
> --------------
>      trunk/blender/build_files/cmake/Modules/FindPythonLibsUnix.cmake
>      trunk/blender/build_files/scons/config/Modules/FindPython.py
>      trunk/blender/source/blender/python/generic/bgl.c
>      trunk/blender/source/blender/python/generic/idprop_py_api.c
>      trunk/blender/source/blender/python/intern/bpy_rna.c
>      trunk/blender/source/blender/python/intern/bpy_util.h
>      trunk/blender/source/blender/python/mathutils/mathutils_Color.c
>      trunk/blender/source/blender/python/mathutils/mathutils_Euler.c
>      trunk/blender/source/blender/python/mathutils/mathutils_Matrix.c
>      trunk/blender/source/blender/python/mathutils/mathutils_Quaternion.c
>      trunk/blender/source/blender/python/mathutils/mathutils_Vector.c
>
> Modified: trunk/blender/build_files/cmake/Modules/FindPythonLibsUnix.cmake
> ===================================================================
> --- trunk/blender/build_files/cmake/Modules/FindPythonLibsUnix.cmake	2012-11-05 13:43:02 UTC (rev 51905)
> +++ trunk/blender/build_files/cmake/Modules/FindPythonLibsUnix.cmake	2012-11-05 13:48:42 UTC (rev 51906)
> @@ -34,7 +34,7 @@
>     SET(PYTHON_ROOT_DIR $ENV{PYTHON_ROOT_DIR})
>   ENDIF()
>   
> -SET(PYTHON_VERSION 3.2 CACHE STRING "Python Version (major and minor only)")
> +SET(PYTHON_VERSION 3.3 CACHE STRING "Python Version (major and minor only)")
>   MARK_AS_ADVANCED(PYTHON_VERSION)
>   
>   
>
> Modified: trunk/blender/build_files/scons/config/Modules/FindPython.py
> ===================================================================
> --- trunk/blender/build_files/scons/config/Modules/FindPython.py	2012-11-05 13:43:02 UTC (rev 51905)
> +++ trunk/blender/build_files/scons/config/Modules/FindPython.py	2012-11-05 13:48:42 UTC (rev 51906)
> @@ -5,7 +5,7 @@
>   
>       python = "/usr"
>       abi_flags = "m"  # Most common for linux distros
> -    version = "3.2"
> +    version = "3.3"
>   
>       # Determine ABI flags used on this system
>       include = os.path.join(python, "include")
>
> Modified: trunk/blender/source/blender/python/generic/bgl.c
> ===================================================================
> --- trunk/blender/source/blender/python/generic/bgl.c	2012-11-05 13:43:02 UTC (rev 51905)
> +++ trunk/blender/source/blender/python/generic/bgl.c	2012-11-05 13:48:42 UTC (rev 51906)
> @@ -520,7 +520,7 @@
>   	else if (PySlice_Check(item)) {
>   		Py_ssize_t start, stop, step, slicelength;
>   
> -		if (PySlice_GetIndicesEx((void *)item, self->dimensions[0], &start, &stop, &step, &slicelength) < 0)
> +		if (PySlice_GetIndicesEx(item, self->dimensions[0], &start, &stop, &step, &slicelength) < 0)
>   			return NULL;
>   
>   		if (slicelength <= 0) {
> @@ -556,7 +556,7 @@
>   	else if (PySlice_Check(item)) {
>   		Py_ssize_t start, stop, step, slicelength;
>   
> -		if (PySlice_GetIndicesEx((void *)item, self->dimensions[0], &start, &stop, &step, &slicelength) < 0)
> +		if (PySlice_GetIndicesEx(item, self->dimensions[0], &start, &stop, &step, &slicelength) < 0)
>   			return -1;
>   
>   		if (step == 1)
>
> Modified: trunk/blender/source/blender/python/generic/idprop_py_api.c
> ===================================================================
> --- trunk/blender/source/blender/python/generic/idprop_py_api.c	2012-11-05 13:43:02 UTC (rev 51905)
> +++ trunk/blender/source/blender/python/generic/idprop_py_api.c	2012-11-05 13:48:42 UTC (rev 51906)
> @@ -1187,7 +1187,7 @@
>   	else if (PySlice_Check(item)) {
>   		Py_ssize_t start, stop, step, slicelength;
>   
> -		if (PySlice_GetIndicesEx((void *)item, self->prop->len, &start, &stop, &step, &slicelength) < 0)
> +		if (PySlice_GetIndicesEx(item, self->prop->len, &start, &stop, &step, &slicelength) < 0)
>   			return NULL;
>   
>   		if (slicelength <= 0) {
> @@ -1222,7 +1222,7 @@
>   	else if (PySlice_Check(item)) {
>   		Py_ssize_t start, stop, step, slicelength;
>   
> -		if (PySlice_GetIndicesEx((void *)item, self->prop->len, &start, &stop, &step, &slicelength) < 0)
> +		if (PySlice_GetIndicesEx(item, self->prop->len, &start, &stop, &step, &slicelength) < 0)
>   			return -1;
>   
>   		if (step == 1)
>
> Modified: trunk/blender/source/blender/python/intern/bpy_rna.c
> ===================================================================
> --- trunk/blender/source/blender/python/intern/bpy_rna.c	2012-11-05 13:43:02 UTC (rev 51905)
> +++ trunk/blender/source/blender/python/intern/bpy_rna.c	2012-11-05 13:48:42 UTC (rev 51906)
> @@ -2612,7 +2612,7 @@
>   			int len = pyrna_prop_array_length(self);
>   			Py_ssize_t start, stop, slicelength;
>   
> -			if (PySlice_GetIndicesEx((void *)key, len, &start, &stop, &step, &slicelength) < 0)
> +			if (PySlice_GetIndicesEx(key, len, &start, &stop, &step, &slicelength) < 0)
>   				return NULL;
>   
>   			if (slicelength <= 0) {
> @@ -2780,7 +2780,7 @@
>   		int len = RNA_property_array_length(&self->ptr, self->prop);
>   		Py_ssize_t start, stop, step, slicelength;
>   
> -		if (PySlice_GetIndicesEx((void *)key, len, &start, &stop, &step, &slicelength) < 0) {
> +		if (PySlice_GetIndicesEx(key, len, &start, &stop, &step, &slicelength) < 0) {
>   			ret = -1;
>   		}
>   		else if (slicelength <= 0) {
>
> Modified: trunk/blender/source/blender/python/intern/bpy_util.h
> ===================================================================
> --- trunk/blender/source/blender/python/intern/bpy_util.h	2012-11-05 13:43:02 UTC (rev 51905)
> +++ trunk/blender/source/blender/python/intern/bpy_util.h	2012-11-05 13:48:42 UTC (rev 51906)
> @@ -29,9 +29,14 @@
>   #define __BPY_UTIL_H__
>   
>   #if PY_VERSION_HEX <  0x03020000
> -#error "Python 3.2 or greater is required, you'll need to update your python."
> +#  error "Python 3.2 or greater is required, you'll need to update your python."
>   #endif
>   
> +#if PY_VERSION_HEX <  0x03030000
> +#  warning "Python 3.2 will be deprecated soon, upgrade to Python 3.3."
> +#endif
> +
> +
>   #include "RNA_types.h" /* for EnumPropertyItem only */
>   
>   struct EnumPropertyItem;
>
> Modified: trunk/blender/source/blender/python/mathutils/mathutils_Color.c
> ===================================================================
> --- trunk/blender/source/blender/python/mathutils/mathutils_Color.c	2012-11-05 13:43:02 UTC (rev 51905)
> +++ trunk/blender/source/blender/python/mathutils/mathutils_Color.c	2012-11-05 13:48:42 UTC (rev 51906)
> @@ -306,7 +306,7 @@
>   	else if (PySlice_Check(item)) {
>   		Py_ssize_t start, stop, step, slicelength;
>   
> -		if (PySlice_GetIndicesEx((void *)item, COLOR_SIZE, &start, &stop, &step, &slicelength) < 0)
> +		if (PySlice_GetIndicesEx(item, COLOR_SIZE, &start, &stop, &step, &slicelength) < 0)
>   			return NULL;
>   
>   		if (slicelength <= 0) {
> @@ -342,7 +342,7 @@
>   	else if (PySlice_Check(item)) {
>   		Py_ssize_t start, stop, step, slicelength;
>   
> -		if (PySlice_GetIndicesEx((void *)item, COLOR_SIZE, &start, &stop, &step, &slicelength) < 0)
> +		if (PySlice_GetIndicesEx(item, COLOR_SIZE, &start, &stop, &step, &slicelength) < 0)
>   			return -1;
>   
>   		if (step == 1)
>
> Modified: trunk/blender/source/blender/python/mathutils/mathutils_Euler.c
> ===================================================================
> --- trunk/blender/source/blender/python/mathutils/mathutils_Euler.c	2012-11-05 13:43:02 UTC (rev 51905)
> +++ trunk/blender/source/blender/python/mathutils/mathutils_Euler.c	2012-11-05 13:48:42 UTC (rev 51906)
> @@ -497,7 +497,7 @@
>   	else if (PySlice_Check(item)) {
>   		Py_ssize_t start, stop, step, slicelength;
>   
> -		if (PySlice_GetIndicesEx((void *)item, EULER_SIZE, &start, &stop, &step, &slicelength) < 0)
> +		if (PySlice_GetIndicesEx(item, EULER_SIZE, &start, &stop, &step, &slicelength) < 0)
>   			return NULL;
>   
>   		if (slicelength <= 0) {
> @@ -534,7 +534,7 @@
>   	else if (PySlice_Check(item)) {
>   		Py_ssize_t start, stop, step, slicelength;
>   
> -		if (PySlice_GetIndicesEx((void *)item, EULER_SIZE, &start, &stop, &step, &slicelength) < 0)
> +		if (PySlice_GetIndicesEx(item, EULER_SIZE, &start, &stop, &step, &slicelength) < 0)
>   			return -1;
>   
>   		if (step == 1)
>
> Modified: trunk/blender/source/blender/python/mathutils/mathutils_Matrix.c
> ===================================================================
> --- trunk/blender/source/blender/python/mathutils/mathutils_Matrix.c	2012-11-05 13:43:02 UTC (rev 51905)
> +++ trunk/blender/source/blender/python/mathutils/mathutils_Matrix.c	2012-11-05 13:48:42 UTC (rev 51906)
> @@ -2087,7 +2087,7 @@
>   	else if (PySlice_Check(item)) {
>   		Py_ssize_t start, stop, step, slicelength;
>   
> -		if (PySlice_GetIndicesEx((void *)item, self->num_row, &start, &stop, &step, &slicelength) < 0)
> +		if (PySlice_GetIndicesEx(item, self->num_row, &start, &stop, &step, &slicelength) < 0)
>   			return NULL;
>   
>   		if (slicelength <= 0) {
> @@ -2123,7 +2123,7 @@
>   	else if (PySlice_Check(item)) {
>   		Py_ssize_t start, stop, step, slicelength;
>   
> -		if (PySlice_GetIndicesEx((void *)item, self->num_row, &start, &stop, &step, &slicelength) < 0)
> +		if (PySlice_GetIndicesEx(item, self->num_row, &start, &stop, &step, &slicelength) < 0)
>   			return -1;
>   
>   		if (step == 1)
> @@ -2626,7 +2626,7 @@
>   	else if (PySlice_Check(item)) {
>   		Py_ssize_t start, stop, step, slicelength;
>   
> -		if (PySlice_GetIndicesEx((void *)item, MatrixAccess_len(self), &start, &stop, &step, &slicelength) < 0)
> +		if (PySlice_GetIndicesEx(item, MatrixAccess_len(self), &start, &stop, &step, &slicelength) < 0)
>   			return NULL;
>   
>   		if (slicelength <= 0) {
>
> Modified: trunk/blender/source/blender/python/mathutils/mathutils_Quaternion.c
> ===================================================================
> --- trunk/blender/source/blender/python/mathutils/mathutils_Quaternion.c	2012-11-05 13:43:02 UTC (rev 51905)
> +++ trunk/blender/source/blender/python/mathutils/mathutils_Quaternion.c	2012-11-05 13:48:42 UTC (rev 51906)
> @@ -670,7 +670,7 @@
>   	else if (PySlice_Check(item)) {
>   		Py_ssize_t start, stop, step, slicelength;
>   
> -		if (PySlice_GetIndicesEx((void *)item, QUAT_SIZE, &start, &stop, &step, &slicelength) < 0)
> +		if (PySlice_GetIndicesEx(item, QUAT_SIZE, &start, &stop, &step, &slicelength) < 0)
>   			return NULL;
>   
>   		if (slicelength <= 0) {
> @@ -707,7 +707,7 @@
>   	else if (PySlice_Check(item)) {
>   		Py_ssize_t start, stop, step, slicelength;
>   
> -		if (PySlice_GetIndicesEx((void *)item, QUAT_SIZE, &start, &stop, &step, &slicelength) < 0)
> +		if (PySlice_GetIndicesEx(item, QUAT_SIZE, &start, &stop, &step, &slicelength) < 0)
>   			return -1;
>   
>   		if (step == 1)
>
> Modified: trunk/blender/source/blender/python/mathutils/mathutils_Vector.c
> ===================================================================
> --- trunk/blender/source/blender/python/mathutils/mathutils_Vector.c	2012-11-05 13:43:02 UTC (rev 51905)
> +++ trunk/blender/source/blender/python/mathutils/mathutils_Vector.c	2012-11-05 13:48:42 UTC (rev 51906)
> @@ -1976,7 +1976,7 @@
>   	else if (PySlice_Check(item)) {
>   		Py_ssize_t start, stop, step, slicelength;
>   
> -		if (PySlice_GetIndicesEx((void *)item, self->size, &start, &stop, &step, &slicelength) < 0)
> +		if (PySlice_GetIndicesEx(item, self->size, &start, &stop, &step, &slicelength) < 0)
>   			return NULL;
>   
>   		if (slicelength <= 0) {
> @@ -2012,7 +2012,7 @@
>   	else if (PySlice_Check(item)) {
>   		Py_ssize_t start, stop, step, slicelength;
>   
> -		if (PySlice_GetIndicesEx((void *)item, self->size, &start, &stop, &step, &slicelength) < 0)
> +		if (PySlice_GetIndicesEx(item, self->size, &start, &stop, &step, &slicelength) < 0)
>   			return -1;
>   
>   		if (step == 1)
>
> _______________________________________________
> Bf-blender-cvs mailing list
> Bf-blender-cvs at blender.org
> http://lists.blender.org/mailman/listinfo/bf-blender-cvs


-- 
Thomas Dinges
Blender Developer, Artist and Musician

www.dingto.org



More information about the Bf-committers mailing list