[Bf-blender-cvs] [5bddfde217b] master: cmake/deps: update Python to 3.9.1
Ray Molenkamp
noreply at git.blender.org
Tue Feb 9 23:40:17 CET 2021
Commit: 5bddfde217b1477c02de9dcfa8c078969d432519
Author: Ray Molenkamp
Date: Wed Feb 10 09:24:47 2021 +1100
Branches: master
https://developer.blender.org/rB5bddfde217b1477c02de9dcfa8c078969d432519
cmake/deps: update Python to 3.9.1
The following packages also have received updates:
- IDNA 2.10
- CHARDET 4.0.0
- URLLIB3 1.26.3
- CERTIFI 2020.12.5
- REQUESTS 2.25.1
- NUMPY 1.19.5
numpy has gained a hard dependency on cython:
- CYTHON 0.29.21
Notes:
- This only updates the build environment files,
once these are built, Blender can default to Python 3.9.
- The 'm' suffix for Python binaries/libs has been removed.
- The macOS patch in Python 3.7 is has been removed.
Reviewed By: sybren, campbellbarton, sebbas
Ref D10257
===================================================================
M build_files/build_environment/cmake/harvest.cmake
M build_files/build_environment/cmake/numpy.cmake
M build_files/build_environment/cmake/python.cmake
M build_files/build_environment/cmake/python_site_packages.cmake
M build_files/build_environment/cmake/versions.cmake
M build_files/build_environment/patches/python_linux.diff
D build_files/build_environment/patches/python_macos.diff
===================================================================
diff --git a/build_files/build_environment/cmake/harvest.cmake b/build_files/build_environment/cmake/harvest.cmake
index 6785b727a69..308cb77144c 100644
--- a/build_files/build_environment/cmake/harvest.cmake
+++ b/build_files/build_environment/cmake/harvest.cmake
@@ -162,7 +162,7 @@ harvest(png/include png/include "*.h")
harvest(png/lib png/lib "*.a")
harvest(pugixml/include pugixml/include "*.hpp")
harvest(pugixml/lib pugixml/lib "*.a")
-harvest(python/bin python/bin "python${PYTHON_SHORT_VERSION}m")
+harvest(python/bin python/bin "python${PYTHON_SHORT_VERSION}")
harvest(python/include python/include "*h")
harvest(python/lib python/lib "*")
harvest(sdl/include/SDL2 sdl/include "*.h")
diff --git a/build_files/build_environment/cmake/numpy.cmake b/build_files/build_environment/cmake/numpy.cmake
index 03316a8fc63..7a1b00895f4 100644
--- a/build_files/build_environment/cmake/numpy.cmake
+++ b/build_files/build_environment/cmake/numpy.cmake
@@ -47,4 +47,5 @@ ExternalProject_Add(external_numpy
add_dependencies(
external_numpy
external_python
+ external_python_site_packages
)
diff --git a/build_files/build_environment/cmake/python.cmake b/build_files/build_environment/cmake/python.cmake
index dfb2437d3cb..5731a0e0ae8 100644
--- a/build_files/build_environment/cmake/python.cmake
+++ b/build_files/build_environment/cmake/python.cmake
@@ -43,7 +43,7 @@ if(WIN32)
PREFIX ${BUILD_DIR}/python
CONFIGURE_COMMAND ""
BUILD_COMMAND cd ${BUILD_DIR}/python/src/external_python/pcbuild/ && set IncludeTkinter=false && call build.bat -e -p x64 -c ${BUILD_MODE}
- INSTALL_COMMAND ${PYTHON_BINARY_INTERNAL} ${PYTHON_SRC}/PC/layout/main.py -b ${PYTHON_SRC}/PCbuild/amd64 -s ${PYTHON_SRC} -t ${PYTHON_SRC}/tmp/ --include-underpth --include-stable --include-pip --include-dev --include-launchers --include-venv --include-symbols ${PYTHON_EXTRA_INSTLAL_FLAGS} --copy ${LIBDIR}/python
+ INSTALL_COMMAND ${PYTHON_BINARY_INTERNAL} ${PYTHON_SRC}/PC/layout/main.py -b ${PYTHON_SRC}/PCbuild/amd64 -s ${PYTHON_SRC} -t ${PYTHON_SRC}/tmp/ --include-stable --include-pip --include-dev --include-launchers --include-venv --include-symbols ${PYTHON_EXTRA_INSTLAL_FLAGS} --copy ${LIBDIR}/python
)
else()
@@ -74,7 +74,6 @@ else()
endif()
set(PYTHON_CONFIGURE_ENV ${CONFIGURE_ENV} && ${PYTHON_FUNC_CONFIGS})
set(PYTHON_BINARY ${BUILD_DIR}/python/src/external_python/python.exe)
- set(PYTHON_PATCH ${PATCH_CMD} --verbose -p1 -d ${BUILD_DIR}/python/src/external_python < ${PATCH_DIR}/python_macos.diff)
else()
set(PYTHON_CONFIGURE_ENV ${CONFIGURE_ENV})
set(PYTHON_BINARY ${BUILD_DIR}/python/src/external_python/python)
diff --git a/build_files/build_environment/cmake/python_site_packages.cmake b/build_files/build_environment/cmake/python_site_packages.cmake
index d17f65a152b..58d95326ee9 100644
--- a/build_files/build_environment/cmake/python_site_packages.cmake
+++ b/build_files/build_environment/cmake/python_site_packages.cmake
@@ -21,7 +21,7 @@ ExternalProject_Add(external_python_site_packages
CONFIGURE_COMMAND ""
BUILD_COMMAND ""
PREFIX ${BUILD_DIR}/site_packages
- INSTALL_COMMAND ${PYTHON_BINARY} -m pip install idna==${IDNA_VERSION} chardet==${CHARDET_VERSION} urllib3==${URLLIB3_VERSION} certifi==${CERTIFI_VERSION} requests==${REQUESTS_VERSION} --no-binary :all:
+ INSTALL_COMMAND ${PYTHON_BINARY} -m pip install cython==${CYTHON_VERSION} idna==${IDNA_VERSION} chardet==${CHARDET_VERSION} urllib3==${URLLIB3_VERSION} certifi==${CERTIFI_VERSION} requests==${REQUESTS_VERSION} --no-binary :all:
)
add_dependencies(
diff --git a/build_files/build_environment/cmake/versions.cmake b/build_files/build_environment/cmake/versions.cmake
index 98558721cb3..76417b59bb3 100644
--- a/build_files/build_environment/cmake/versions.cmake
+++ b/build_files/build_environment/cmake/versions.cmake
@@ -138,11 +138,11 @@ set(OSL_VERSION 1.10.10)
set(OSL_URI https://github.com/imageworks/OpenShadingLanguage/archive/Release-${OSL_VERSION}.tar.gz)
set(OSL_HASH 00dec08a93c8084e53848b9ad047889f)
-set(PYTHON_VERSION 3.7.7)
-set(PYTHON_SHORT_VERSION 3.7)
-set(PYTHON_SHORT_VERSION_NO_DOTS 37)
+set(PYTHON_VERSION 3.9.1)
+set(PYTHON_SHORT_VERSION 3.9)
+set(PYTHON_SHORT_VERSION_NO_DOTS 39)
set(PYTHON_URI https://www.python.org/ftp/python/${PYTHON_VERSION}/Python-${PYTHON_VERSION}.tar.xz)
-set(PYTHON_HASH 172c650156f7bea68ce31b2fd01fa766)
+set(PYTHON_HASH 61981498e75ac8f00adcb908281fadb6)
set(TBB_VERSION 2019_U9)
set(TBB_URI https://github.com/oneapi-src/oneTBB/archive/${TBB_VERSION}.tar.gz)
@@ -156,16 +156,17 @@ set(NANOVDB_GIT_UID e62f7a0bf1e27397223c61ddeaaf57edf111b77f)
set(NANOVDB_URI https://github.com/AcademySoftwareFoundation/openvdb/archive/${NANOVDB_GIT_UID}.tar.gz)
set(NANOVDB_HASH 90919510bc6ccd630fedc56f748cb199)
-set(IDNA_VERSION 2.9)
-set(CHARDET_VERSION 3.0.4)
-set(URLLIB3_VERSION 1.25.9)
-set(CERTIFI_VERSION 2020.4.5.2)
-set(REQUESTS_VERSION 2.23.0)
+set(IDNA_VERSION 2.10)
+set(CHARDET_VERSION 4.0.0)
+set(URLLIB3_VERSION 1.26.3)
+set(CERTIFI_VERSION 2020.12.5)
+set(REQUESTS_VERSION 2.25.1)
+set(CYTHON_VERSION 0.29.21)
-set(NUMPY_VERSION 1.17.5)
-set(NUMPY_SHORT_VERSION 1.17)
+set(NUMPY_VERSION 1.19.5)
+set(NUMPY_SHORT_VERSION 1.19)
set(NUMPY_URI https://github.com/numpy/numpy/releases/download/v${NUMPY_VERSION}/numpy-${NUMPY_VERSION}.zip)
-set(NUMPY_HASH 763a5646fa6eef7a22f4895bca0524f2)
+set(NUMPY_HASH f6a1b48717c552bbc18f1adc3cc1fe0e)
set(LAME_VERSION 3.100)
set(LAME_URI http://downloads.sourceforge.net/project/lame/lame/3.100/lame-${LAME_VERSION}.tar.gz)
diff --git a/build_files/build_environment/patches/python_linux.diff b/build_files/build_environment/patches/python_linux.diff
index 24d625c7ceb..a9baae8ce32 100644
--- a/build_files/build_environment/patches/python_linux.diff
+++ b/build_files/build_environment/patches/python_linux.diff
@@ -2,23 +2,23 @@ diff --git a/setup.py.orig b/setup.py
index a97a755..07ce853 100644
--- a/setup.py.orig
+++ b/setup.py
-@@ -1422,13 +1422,13 @@ class PyBuildExt(build_ext):
+@@ -1603,13 +1603,13 @@
version = line.split()[2]
break
if version >= version_req:
-- if (self.compiler.find_library_file(lib_dirs, 'z')):
-+ if (self.compiler.find_library_file(lib_dirs, 'z_pic')):
- if host_platform == "darwin":
+- if (self.compiler.find_library_file(self.lib_dirs, 'z')):
++ if (self.compiler.find_library_file(self.lib_dirs, 'z_pic')):
+ if MACOS:
zlib_extra_link_args = ('-Wl,-search_paths_first',)
else:
zlib_extra_link_args = ()
- exts.append( Extension('zlib', ['zlibmodule.c'],
-- libraries = ['z'],
-+ libraries = ['z_pic'],
- extra_link_args = zlib_extra_link_args))
+ self.add(Extension('zlib', ['zlibmodule.c'],
+- libraries=['z'],
++ libraries=['z_pic'],
+ extra_link_args=zlib_extra_link_args))
have_zlib = True
else:
-@@ -1442,7 +1442,7 @@ class PyBuildExt(build_ext):
+@@ -1623,7 +1623,7 @@
# crc32 if we have it. Otherwise binascii uses its own.
if have_zlib:
extra_compile_args = ['-DUSE_ZLIB_CRC32']
@@ -27,12 +27,12 @@ index a97a755..07ce853 100644
extra_link_args = zlib_extra_link_args
else:
extra_compile_args = []
-@@ -1991,7 +1991,7 @@ class PyBuildExt(build_ext):
+@@ -2168,7 +2168,7 @@
+ ffi_inc = None
print('Header file {} does not exist'.format(ffi_h))
- ffi_lib = None
- if ffi_inc is not None:
+ if ffi_lib is None and ffi_inc:
- for lib_name in ('ffi', 'ffi_pic'):
+ for lib_name in ('ffi_pic', ):
- if (self.compiler.find_library_file(lib_dirs, lib_name)):
+ if (self.compiler.find_library_file(self.lib_dirs, lib_name)):
ffi_lib = lib_name
break
diff --git a/build_files/build_environment/patches/python_macos.diff b/build_files/build_environment/patches/python_macos.diff
deleted file mode 100644
index 22ccbebee2f..00000000000
--- a/build_files/build_environment/patches/python_macos.diff
+++ /dev/null
@@ -1,289 +0,0 @@
-diff -ru a/Doc/library/ctypes.rst b/Doc/library/ctypes.rst
---- a/Doc/library/ctypes.rst 2020-03-10 07:11:12.000000000 +0100
-+++ b/Doc/library/ctypes.rst 2020-07-14 08:10:10.000000000 +0200
-@@ -1551,6 +1551,13 @@
- value usable as argument (integer, string, ctypes instance). This allows
- defining adapters that can adapt custom objects as function parameters.
-
-+ .. attribute:: variadic
-+
-+ Assign a boolean to specify that the function takes a variable number of
-+ arguments. This does not matter on most platforms, but for Apple arm64
-+ platforms variadic functions have a different calling convention than
-+ normal functions.
-+
- .. attribute:: errcheck
-
- Assign a Python function or another callable to this attribute. The
-diff -ru a/Modules/_ctypes/_ctypes.c b/Modules/_ctypes/_ctypes.c
---- a/Modules/_ctypes/_ctypes.c 2020-03-10 07:11:12.000000000 +0100
-+++ b/Modules/_ctypes/_ctypes.c 2020-07-14 08:14:41.000000000 +0200
-@@ -3175,6 +3175,35 @@
- }
-
- static int
-+PyCFuncPtr_set_variadic(PyCFuncPtrObject *self, PyObject *ob, void *Py_UNUSED(ignored))
-+{
-+ StgDictObject *dict = PyObject_stgdict((PyObject *)self);
-+ assert(dict);
-+ int r = PyObject_IsTrue(ob);
-+ if (r == 1) {
-+ dict->flags |= FUNCFLAG_VARIADIC;
-+ return 0;
-+ } else if (r == 0) {
-+ dict->flags &= ~FUNCFLAG_VARIADIC;
-+ return 0;
-+ } else {
-+ return -1;
-+ }
-+}
-+
-+static PyObject *
-+PyCFuncPtr_get_variadic(PyCFuncPtrObject *self, void *Py_UNUSED(ignored))
-+{
-+ StgDictObject *dict = PyObject_st
@@ Diff output truncated at 10240 characters. @@
More information about the Bf-blender-cvs
mailing list