Skip to content

Commit

Permalink
Update SDK Python to 3.9.10
Browse files Browse the repository at this point in the history
  • Loading branch information
o01eg committed May 10, 2022
1 parent 41d8904 commit 7eee311
Show file tree
Hide file tree
Showing 17 changed files with 120 additions and 220 deletions.
8 changes: 4 additions & 4 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -316,11 +316,11 @@ if(WIN32)
zipPythonSTDlib
DEPENDEES install
WORKING_DIRECTORY
<INSTALL_DIR>/lib/python36
<INSTALL_DIR>/lib/python39
COMMAND ${CMAKE_COMMAND} -E remove_directory
<INSTALL_DIR>/lib/python36/lib-dynload
<INSTALL_DIR>/lib/python39/lib-dynload
COMMAND ${ZIP_EXECUTABLE} -r -9 -q --exclude=*.pyc
<INSTALL_DIR>/bin/python36.zip
<INSTALL_DIR>/bin/python39.zip
.
COMMENT "Zip python3 standard library"
)
Expand All @@ -329,7 +329,7 @@ if(WIN32)
removePythonSTDlib
DEPENDEES zipPythonSTDlib
COMMAND ${CMAKE_COMMAND} -E remove_directory
<INSTALL_DIR>/lib/python36
<INSTALL_DIR>/lib/python39
COMMENT "Remove python3 standard library from install"
)
endif()
Expand Down
8 changes: 4 additions & 4 deletions Sources.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,12 @@ set(LIBPNG_VERSION 1.6.37)
set(LIBPNG_URL https://downloads.sourceforge.net/project/libpng/libpng16/${LIBPNG_VERSION}/libpng-${LIBPNG_VERSION}.tar.gz)
set(LIBPNG_MD5 6c7519f6c75939efa0ed3053197abd54)

set(PYTHON_CMAKE_URL https://github.com/python-cmake-buildsystem/python-cmake-buildsystem/archive/d7e201c3308c51eb1766701cbe615f38e4762274.zip)
set(PYTHON_CMAKE_MD5 107901733cc463b30640a1c8b5aea879)
set(PYTHON_CMAKE_URL https://github.com/python-cmake-buildsystem/python-cmake-buildsystem/archive/bb45aa7a4cfc7a5a93bc490c6158f702d1a2226f.zip)
set(PYTHON_CMAKE_MD5 66c4b98884e91139a5544057c56d2c82)

set(PYTHON3_VERSION 3.6.5)
set(PYTHON3_VERSION 3.9.10)
set(PYTHON3_URL https://www.python.org/ftp/python/${PYTHON3_VERSION}/Python-${PYTHON3_VERSION}.tgz)
set(PYTHON3_MD5 ab25d24b1f8cc4990ade979f6dc37883)
set(PYTHON3_MD5 1440acb71471e2394befdb30b1a958d1)

set(FREETYPE_VERSION 2.9)
set(FREETYPE_URL http://downloads.sourceforge.net/project/freetype/freetype2/${FREETYPE_VERSION}/freetype-${FREETYPE_VERSION}.tar.gz)
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,17 +1,18 @@
From f8d2b5b5d47fbcae87f99df214b3e5851837cb98 Mon Sep 17 00:00:00 2001
From 37510a646ba3594fb786748737a891f490ccdf92 Mon Sep 17 00:00:00 2001
From: Marcel Metz <[email protected]>
Date: Mon, 21 Mar 2016 20:32:22 +0100
Subject: [PATCH] Install libpython pdb file when building shared libraries
Subject: [PATCH 01/14] Install libpython pdb file when building shared
libraries

---
cmake/libpython/CMakeLists.txt | 17 +++++++++++++++++
1 file changed, 17 insertions(+)

diff --git a/cmake/libpython/CMakeLists.txt b/cmake/libpython/CMakeLists.txt
index 25edced..df247fb 100644
index 40d32f8..2283586 100644
--- a/cmake/libpython/CMakeLists.txt
+++ b/cmake/libpython/CMakeLists.txt
@@ -506,6 +506,15 @@ if(BUILD_LIBPYTHON_SHARED)
@@ -589,6 +589,15 @@ if(BUILD_LIBPYTHON_SHARED)
set_target_properties(libpython-shared PROPERTIES
ARCHIVE_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}/${LIBPYTHON_ARCHIVEDIR}
)
Expand All @@ -27,8 +28,8 @@ index 25edced..df247fb 100644
if(APPLE)
# HACK For python <= 2.7.3, this fix link error related to undefined _environ symbol and
# is equivalent to solution implemented in commit http://hg.python.org/cpython/rev/864b983
@@ -559,6 +568,14 @@ if(BUILD_LIBPYTHON_SHARED)
)
@@ -644,6 +653,14 @@ if(BUILD_LIBPYTHON_SHARED)
add_dependencies(${targetname} generate_libpython3stub_lib)

target_link_libraries(${targetname} ${python3stub_lib})
+
Expand All @@ -43,5 +44,5 @@ index 25edced..df247fb 100644

if(IS_PY3 AND UNIX AND NOT APPLE)
--
2.14.3
2.35.1

22 changes: 11 additions & 11 deletions patches/python-cmake/0003-Don-t-export-python-cmake-targets.patch
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
From 7947f1a5bfdcc6a7d659e00bb81f53981a7696c7 Mon Sep 17 00:00:00 2001
From 539de398ec4bc6e0b052db6c090c085f74284946 Mon Sep 17 00:00:00 2001
From: Marcel Metz <[email protected]>
Date: Mon, 21 Mar 2016 20:39:08 +0100
Subject: [PATCH] Don't export python cmake targets
Subject: [PATCH 02/14] Don't export python cmake targets

---
CMakeLists.txt | 12 ------------
Expand All @@ -10,10 +10,10 @@ Subject: [PATCH] Don't export python cmake targets
3 files changed, 2 insertions(+), 14 deletions(-)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 1c34feb..55f8357 100644
index be183d7..e220887 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -664,18 +664,6 @@ write_basic_package_version_file(
@@ -827,18 +827,6 @@ write_basic_package_version_file(
COMPATIBILITY SameMajorVersion
)

Expand All @@ -29,14 +29,14 @@ index 1c34feb..55f8357 100644
- )
-endif()
-
endif()

# Install License
set(license_destination ${PYTHONHOME})
if(INSTALL_WINDOWS_TRADITIONAL)
diff --git a/cmake/libpython/CMakeLists.txt b/cmake/libpython/CMakeLists.txt
index df247fb..7a089a8 100644
index 2283586..72ceffe 100644
--- a/cmake/libpython/CMakeLists.txt
+++ b/cmake/libpython/CMakeLists.txt
@@ -492,7 +492,7 @@ function(add_libpython name type install component)
@@ -575,7 +575,7 @@ function(add_libpython name type install component)
set_property(GLOBAL APPEND PROPERTY PYTHON_TARGETS ${name})

if(install)
Expand All @@ -46,10 +46,10 @@ index df247fb..7a089a8 100644
LIBRARY DESTINATION ${LIBPYTHON_LIBDIR}
RUNTIME DESTINATION ${LIBPYTHON_LIBDIR}
diff --git a/cmake/python/CMakeLists.txt b/cmake/python/CMakeLists.txt
index cdb291e..a1167b8 100644
index 7850be5..4e6d39a 100644
--- a/cmake/python/CMakeLists.txt
+++ b/cmake/python/CMakeLists.txt
@@ -30,7 +30,7 @@ endif()
@@ -32,7 +32,7 @@ endif()
# Export target
set_property(GLOBAL APPEND PROPERTY PYTHON_TARGETS python)

Expand All @@ -59,5 +59,5 @@ index cdb291e..a1167b8 100644
# See "is_python_build()" in sysconfig.py
add_custom_command(TARGET python PRE_BUILD
--
2.14.3
2.35.1

Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
From 78c4a7e765188dc6279dc4b8b78df862564eb034 Mon Sep 17 00:00:00 2001
From 3f4ef2f1c8e655a90223c009b9d46334a5eb3b42 Mon Sep 17 00:00:00 2001
From: Marcel Metz <[email protected]>
Date: Mon, 21 Mar 2016 20:39:55 +0100
Subject: [PATCH] Change pathes to match current SDK layout
Subject: [PATCH 03/14] Change pathes to match current SDK layout

---
CMakeLists.txt | 9 +++------
1 file changed, 3 insertions(+), 6 deletions(-)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 55f8357..e04822d 100644
index ef2cf2b..4176f88 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -323,10 +323,7 @@ if(USE_LIB64)
@@ -435,10 +435,7 @@ if(USE_LIB64)
set_property(GLOBAL PROPERTY FIND_LIBRARY_USE_LIB64_PATHS ON)
set(LIBDIR "lib64")
endif()
Expand All @@ -23,7 +23,7 @@ index 55f8357..e04822d 100644

# Install tree directory
set(BIN_INSTALL_DIR bin) # Contains the python executable
@@ -348,7 +345,7 @@ if(INSTALL_WINDOWS_TRADITIONAL)
@@ -460,7 +457,7 @@ if(INSTALL_WINDOWS_TRADITIONAL)
endif()
set(INCLUDE_INSTALL_DIR include/python${LD_VERSION})
if(MSVC)
Expand All @@ -32,7 +32,7 @@ index 55f8357..e04822d 100644
endif()
# Build tree directory
set(BIN_BUILD_DIR ${PROJECT_BINARY_DIR}/bin)
@@ -356,7 +353,7 @@ set(CONFIG_BUILD_DIR ${PROJECT_BINARY_DIR}/${CONFIG_INSTALL_DIR})
@@ -468,7 +465,7 @@ set(CONFIG_BUILD_DIR ${PROJECT_BINARY_DIR}/${CONFIG_INSTALL_DIR})
set(EXTENSION_BUILD_DIR ${PROJECT_BINARY_DIR}/${PYTHONHOME}/lib-dynload)
set(INCLUDE_BUILD_DIR ${SRC_DIR}/Include)

Expand All @@ -42,5 +42,5 @@ index 55f8357..e04822d 100644
# Directories specific to 'libpython'
set(LIBPYTHON_LIBDIR ${LIBDIR})
--
2.14.3
2.35.1

Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
From f6e88deab23181a6c48828250b306627a80404b7 Mon Sep 17 00:00:00 2001
From 3f97e258f92ff4164759586fb2a75060be1814d5 Mon Sep 17 00:00:00 2001
From: Marcel Metz <[email protected]>
Date: Tue, 6 Sep 2016 16:59:04 +0200
Subject: [PATCH] Disable MSVC specific compiler warnings
Subject: [PATCH 04/14] Disable MSVC specific compiler warnings

* Disable C4101 'identifier' : unreferenced local variable for libpython.
* Disable C4018 'expression' : signed/unsigned mismatch for libpython.
Expand All @@ -14,10 +14,10 @@ Subject: [PATCH] Disable MSVC specific compiler warnings
1 file changed, 3 insertions(+)

diff --git a/cmake/libpython/CMakeLists.txt b/cmake/libpython/CMakeLists.txt
index 7a089a8..a33084f 100644
index 72ceffe..c7d20f7 100644
--- a/cmake/libpython/CMakeLists.txt
+++ b/cmake/libpython/CMakeLists.txt
@@ -178,6 +178,9 @@ elseif(WIN32)
@@ -215,6 +215,9 @@ elseif(WIN32)
Py_ENABLE_SHARED
MS_DLL_ID="${ms_dll_id}"
)
Expand All @@ -28,5 +28,5 @@ index 7a089a8..a33084f 100644

set(THREAD_SOURCES )
--
2.14.3
2.35.1

14 changes: 7 additions & 7 deletions patches/python-cmake/0006-Add-Mac-OSX-framework-support.patch
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
From 13d12f39eee0a779e666363ef8350d44568672cd Mon Sep 17 00:00:00 2001
From 17d18f4aa8e130b85a716a62407e28e394104eb3 Mon Sep 17 00:00:00 2001
From: Marcel Metz <[email protected]>
Date: Sat, 9 Apr 2016 20:16:24 +0200
Subject: [PATCH] Add Mac OSX framework support
Subject: [PATCH 05/14] Add Mac OSX framework support

---
CMakeLists.txt | 8 ++++++++
cmake/libpython/CMakeLists.txt | 13 +++++++++++++
2 files changed, 21 insertions(+)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index e04822d..24ad782 100644
index 4176f88..0734f4f 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -79,6 +79,14 @@ else()
@@ -77,6 +77,14 @@ else()
set(BUILD_WININST OFF)
set(BUILD_WININST_ALWAYS OFF)
endif()
Expand All @@ -28,10 +28,10 @@ index e04822d..24ad782 100644
option(INSTALL_MANUAL "Install man files" ON)
option(INSTALL_TEST "Install test files" ON)
diff --git a/cmake/libpython/CMakeLists.txt b/cmake/libpython/CMakeLists.txt
index a33084f..ef66a73 100644
index c7d20f7..f9f3433 100644
--- a/cmake/libpython/CMakeLists.txt
+++ b/cmake/libpython/CMakeLists.txt
@@ -494,11 +494,24 @@ function(add_libpython name type install component)
@@ -577,11 +577,24 @@ function(add_libpython name type install component)
# Export target
set_property(GLOBAL APPEND PROPERTY PYTHON_TARGETS ${name})

Expand All @@ -57,5 +57,5 @@ index a33084f..ef66a73 100644
)
endif()
--
2.14.3
2.35.1

Loading

0 comments on commit 7eee311

Please sign in to comment.