Python: move to version 3.4x on all platforms
This commit is contained in:
parent
417efb0e8b
commit
b96d531bc9
@ -556,14 +556,14 @@ set(PLATFORM_LINKFLAGS_DEBUG "")
|
||||
# For alternate Python locations the commandline can be used to override detected/default cache settings, e.g:
|
||||
# On Unix:
|
||||
# cmake ../blender \
|
||||
# -D PYTHON_VERSION=3.3 \
|
||||
# -D PYTHON_INCLUDE_DIR=/opt/py33/include/python3.3d \
|
||||
# -D PYTHON_LIBRARY=/opt/py33/lib/libpython3.3d.so
|
||||
# -D PYTHON_VERSION=3.4 \
|
||||
# -D PYTHON_INCLUDE_DIR=/opt/py34/include/python3.4d \
|
||||
# -D PYTHON_LIBRARY=/opt/py34/lib/libpython3.4d.so
|
||||
#
|
||||
# On Macs:
|
||||
# cmake ../blender \
|
||||
# -D PYTHON_INCLUDE_DIR=/System/Library/Frameworks/Python.framework/Versions/3.3/include/python3.3 \
|
||||
# -D PYTHON_LIBPATH=/System/Library/Frameworks/Python.framework/Versions/3.3/lib/python3.3/config \
|
||||
# -D PYTHON_INCLUDE_DIR=/System/Library/Frameworks/Python.framework/Versions/3.4/include/python3.4 \
|
||||
# -D PYTHON_LIBPATH=/System/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/config \
|
||||
# -G Xcode
|
||||
#
|
||||
# When changing any of this remember to update the notes in doc/build_systems/cmake.txt
|
||||
@ -591,7 +591,7 @@ if(UNIX AND NOT APPLE)
|
||||
find_package_wrapper(Freetype REQUIRED)
|
||||
|
||||
if(WITH_PYTHON)
|
||||
# No way to set py33. remove for now.
|
||||
# No way to set py34. remove for now.
|
||||
# find_package(PythonLibs)
|
||||
|
||||
# Use our own instead, since wothout py is such a rare case,
|
||||
@ -1200,7 +1200,7 @@ elseif(WIN32)
|
||||
endif()
|
||||
|
||||
if(WITH_PYTHON)
|
||||
set(PYTHON_VERSION 3.3) # CACHE STRING)
|
||||
set(PYTHON_VERSION 3.4) # CACHE STRING)
|
||||
|
||||
string(REPLACE "." "" _PYTHON_VERSION_NO_DOTS ${PYTHON_VERSION})
|
||||
# Use shared libs for vc2008 and vc2010 until we actually have vc2010 libs
|
||||
@ -1452,9 +1452,11 @@ elseif(WIN32)
|
||||
|
||||
if(WITH_PYTHON)
|
||||
# normally cached but not since we include them with blender
|
||||
set(PYTHON_VERSION 3.3) # CACHE STRING)
|
||||
set(PYTHON_VERSION 3.4) # CACHE STRING)
|
||||
string(REPLACE "." "" _PYTHON_VERSION_NO_DOTS ${PYTHON_VERSION})
|
||||
set(PYTHON_INCLUDE_DIR "${LIBDIR}/python/include/python${PYTHON_VERSION}") # CACHE PATH)
|
||||
set(PYTHON_LIBRARY "${LIBDIR}/python/lib/python33mw.lib") # CACHE FILEPATH)
|
||||
set(PYTHON_LIBRARY "${LIBDIR}/python/lib/python${_PYTHON_VERSION_NO_DOTS}mw.lib") # CACHE FILEPATH)
|
||||
unset(_PYTHON_VERSION_NO_DOTS)
|
||||
|
||||
# uncached vars
|
||||
set(PYTHON_INCLUDE_DIRS "${PYTHON_INCLUDE_DIR}")
|
||||
|
@ -177,7 +177,7 @@ ARGUMENTS_INFO="\"COMMAND LINE ARGUMENTS:
|
||||
|
||||
--required-numpy
|
||||
Use this in case your distro features a valid python package, but no matching Numpy one.
|
||||
It will force compilation of both python 3.3 and numpy 1.7.
|
||||
It will force compilation of both python and numpy
|
||||
|
||||
--libyaml-cpp-ver=<ver>
|
||||
Ubuntu hack: you may have to force installation of a non-defaut version of libyaml-cpp
|
||||
@ -648,7 +648,7 @@ _init_python() {
|
||||
_src=$SRC/Python-$PYTHON_VERSION
|
||||
_git=false
|
||||
_inst=$INST/python-$PYTHON_VERSION
|
||||
_inst_shortcut=$INST/python-3.3
|
||||
_inst_shortcut=$INST/python-$PYTHON_VERSION_MIN
|
||||
}
|
||||
|
||||
clean_Python() {
|
||||
@ -713,7 +713,7 @@ _init_numpy() {
|
||||
_git=false
|
||||
_inst=$INST/numpy-$NUMPY_VERSION
|
||||
_python=$INST/python-$PYTHON_VERSION
|
||||
_site=lib/python3.3/site-packages
|
||||
_site=lib/python$PYTHON_VERSION_MIN/site-packages
|
||||
_inst_shortcut=$_python/$_site/numpy
|
||||
}
|
||||
|
||||
|
@ -37,7 +37,7 @@ IF(NOT PYTHON_ROOT_DIR AND NOT $ENV{PYTHON_ROOT_DIR} STREQUAL "")
|
||||
SET(PYTHON_ROOT_DIR $ENV{PYTHON_ROOT_DIR})
|
||||
ENDIF()
|
||||
|
||||
SET(PYTHON_VERSION 3.3 CACHE STRING "Python Version (major and minor only)")
|
||||
SET(PYTHON_VERSION 3.4 CACHE STRING "Python Version (major and minor only)")
|
||||
MARK_AS_ADVANCED(PYTHON_VERSION)
|
||||
|
||||
|
||||
@ -188,7 +188,7 @@ IF(PYTHONLIBSUNIX_FOUND)
|
||||
SET(PYTHON_LIBRARIES ${PYTHON_LIBRARY})
|
||||
|
||||
# we need this for installation
|
||||
# XXX No more valid with debian-like py3.3 packages...
|
||||
# XXX No more valid with debian-like py3.4 packages...
|
||||
# GET_FILENAME_COMPONENT(PYTHON_LIBPATH ${PYTHON_LIBRARY} PATH)
|
||||
|
||||
# not used
|
||||
|
@ -6,7 +6,7 @@ def FindPython():
|
||||
|
||||
python = "/usr"
|
||||
abi_flags = "m" # Most common for linux distros
|
||||
version = "3.3"
|
||||
version = "3.4"
|
||||
|
||||
_arch = platform.uname()[4] + "-linux-gnu"
|
||||
|
||||
|
@ -7,7 +7,7 @@ LIBDIR = "${LCGDIR}"
|
||||
BF_PYTHON_ABI_FLAGS = ''
|
||||
BF_PYTHON = '/usr/local'
|
||||
BF_PYTHON_LIBPATH = '${BF_PYTHON}/lib'
|
||||
BF_PYTHON_VERSION = '3.3'
|
||||
BF_PYTHON_VERSION = '3.4'
|
||||
WITH_BF_STATICPYTHON = False
|
||||
BF_PYTHON_INC = '${BF_PYTHON}/include/python${BF_PYTHON_VERSION}${BF_PYTHON_ABI_FLAGS}'
|
||||
BF_PYTHON_BINARY = '${BF_PYTHON}/bin/python${BF_PYTHON_VERSION}'
|
||||
|
@ -7,7 +7,7 @@ LIBDIR = "${LCGDIR}"
|
||||
BF_PYTHON_ABI_FLAGS = ''
|
||||
BF_PYTHON = '/usr/local'
|
||||
BF_PYTHON_LIBPATH = '${BF_PYTHON}/lib'
|
||||
BF_PYTHON_VERSION = '3.3'
|
||||
BF_PYTHON_VERSION = '3.4'
|
||||
WITH_BF_STATICPYTHON = False
|
||||
BF_PYTHON_INC = '${BF_PYTHON}/include/python${BF_PYTHON_VERSION}${BF_PYTHON_ABI_FLAGS}'
|
||||
BF_PYTHON_BINARY = '${BF_PYTHON}/bin/python${BF_PYTHON_VERSION}'
|
||||
|
@ -2,7 +2,7 @@ LCGDIR = '#../lib/windows'
|
||||
LIBDIR = '${LCGDIR}'
|
||||
|
||||
BF_PYTHON = LIBDIR + '/python'
|
||||
BF_PYTHON_VERSION = '3.3'
|
||||
BF_PYTHON_VERSION = '3.4'
|
||||
BF_PYTHON_INC = '${BF_PYTHON}/include/python${BF_PYTHON_VERSION}'
|
||||
BF_PYTHON_BINARY = 'python'
|
||||
BF_PYTHON_LIB = 'python${BF_PYTHON_VERSION[0]}${BF_PYTHON_VERSION[2]}mw'
|
||||
|
@ -2,7 +2,7 @@ LCGDIR = '#../lib/mingw32'
|
||||
LIBDIR = "${LCGDIR}"
|
||||
|
||||
BF_PYTHON = LIBDIR + '/python'
|
||||
BF_PYTHON_VERSION = '3.3'
|
||||
BF_PYTHON_VERSION = '3.4'
|
||||
WITH_BF_STATICPYTHON = False
|
||||
BF_PYTHON_INC = '${BF_PYTHON}/include/python${BF_PYTHON_VERSION}'
|
||||
BF_PYTHON_BINARY = 'python'
|
||||
|
@ -31,7 +31,7 @@ else:
|
||||
BF_FFMPEG_DLL = '${BF_FFMPEG_LIBPATH}/avformat-55.dll ${BF_FFMPEG_LIBPATH}/avcodec-55.dll ${BF_FFMPEG_LIBPATH}/avdevice-55.dll ${BF_FFMPEG_LIBPATH}/avutil-52.dll ${BF_FFMPEG_LIBPATH}/swscale-2.dll'
|
||||
|
||||
BF_PYTHON = LIBDIR + '/python'
|
||||
BF_PYTHON_VERSION = '3.3'
|
||||
BF_PYTHON_VERSION = '3.4'
|
||||
BF_PYTHON_INC = '${BF_PYTHON}/include/python${BF_PYTHON_VERSION}'
|
||||
BF_PYTHON_BINARY = 'python'
|
||||
BF_PYTHON_LIB = 'python${BF_PYTHON_VERSION[0]}${BF_PYTHON_VERSION[2]}'
|
||||
|
@ -2,7 +2,7 @@ LCGDIR = '#../lib/mingw64'
|
||||
LIBDIR = "${LCGDIR}"
|
||||
|
||||
BF_PYTHON = LIBDIR + '/python'
|
||||
BF_PYTHON_VERSION = '3.3'
|
||||
BF_PYTHON_VERSION = '3.4'
|
||||
WITH_BF_STATICPYTHON = False
|
||||
BF_PYTHON_INC = '${BF_PYTHON}/include/python${BF_PYTHON_VERSION}'
|
||||
BF_PYTHON_BINARY = 'python'
|
||||
|
@ -32,7 +32,7 @@ else:
|
||||
|
||||
|
||||
BF_PYTHON = LIBDIR + '/python'
|
||||
BF_PYTHON_VERSION = '3.3'
|
||||
BF_PYTHON_VERSION = '3.4'
|
||||
BF_PYTHON_INC = '${BF_PYTHON}/include/python${BF_PYTHON_VERSION}'
|
||||
BF_PYTHON_BINARY = 'python'
|
||||
BF_PYTHON_LIB = 'python${BF_PYTHON_VERSION[0]}${BF_PYTHON_VERSION[2]}'
|
||||
|
@ -904,19 +904,3 @@ PyObject *PyC_FlagSet_FromBitfield(PyC_FlagSet *items, int flag)
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
/* compat only */
|
||||
#if PY_VERSION_HEX < 0x03030200
|
||||
int
|
||||
_PyLong_AsInt(PyObject *obj)
|
||||
{
|
||||
int overflow;
|
||||
long result = PyLong_AsLongAndOverflow(obj, &overflow);
|
||||
if (overflow || result > INT_MAX || result < INT_MIN) {
|
||||
PyErr_SetString(PyExc_OverflowError,
|
||||
"Python int too large to convert to C int");
|
||||
return -1;
|
||||
}
|
||||
return (int)result;
|
||||
}
|
||||
#endif
|
||||
|
@ -73,8 +73,4 @@ int PyC_FlagSet_ValueFromID(PyC_FlagSet *item, const char *identifier, int
|
||||
int PyC_FlagSet_ToBitfield(PyC_FlagSet *items, PyObject *value, int *r_value, const char *error_prefix);
|
||||
PyObject *PyC_FlagSet_FromBitfield(PyC_FlagSet *items, int flag);
|
||||
|
||||
#if PY_VERSION_HEX < 0x03030200
|
||||
int _PyLong_AsInt(PyObject *obj);
|
||||
#endif
|
||||
|
||||
#endif /* __PY_CAPI_UTILS_H__ */
|
||||
|
@ -27,8 +27,8 @@
|
||||
#ifndef __BPY_UTIL_H__
|
||||
#define __BPY_UTIL_H__
|
||||
|
||||
#if PY_VERSION_HEX < 0x03030000
|
||||
# error "Python 3.3 or greater is required, you'll need to update your python."
|
||||
#if PY_VERSION_HEX < 0x03040000
|
||||
# error "Python 3.4 or greater is required, you'll need to update your python."
|
||||
#endif
|
||||
|
||||
struct EnumPropertyItem;
|
||||
|
Loading…
Reference in New Issue
Block a user