代码拉取完成,页面将自动刷新
同步操作将从 src-openEuler/ceph 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
From a13d33c47c0e713429f7cfbd6106a497838f6396 Mon Sep 17 00:00:00 2001
From: wangzengliang <wangzengliang1@huawei.com>
Date: Fri, 8 Apr 2022 11:35:38 +0800
Subject: [PATCH] cmake: add support python 3.10
---
cmake/modules/BuildBoost.cmake | 2 +-
cmake/modules/FindPython/Support.cmake | 2 +-
src/boost/libs/python/src/exec.cpp | 4 ++--
3 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/cmake/modules/BuildBoost.cmake b/cmake/modules/BuildBoost.cmake
index 468ae419c..320c2dcd5 100644
--- a/cmake/modules/BuildBoost.cmake
+++ b/cmake/modules/BuildBoost.cmake
@@ -70,7 +70,7 @@ function(do_build_boost version)
if(c MATCHES "^python([0-9])\$")
set(with_python_version "${CMAKE_MATCH_1}")
list(APPEND boost_with_libs "python")
- elseif(c MATCHES "^python([0-9])\\.?([0-9])\$")
+ elseif(c MATCHES "^python([0-9])\\.?([0-9]+)\$")
set(with_python_version "${CMAKE_MATCH_1}.${CMAKE_MATCH_2}")
list(APPEND boost_with_libs "python")
else()
diff --git a/cmake/modules/FindPython/Support.cmake b/cmake/modules/FindPython/Support.cmake
index c05bbe330..fb362bfe2 100644
--- a/cmake/modules/FindPython/Support.cmake
+++ b/cmake/modules/FindPython/Support.cmake
@@ -17,7 +17,7 @@ if (NOT DEFINED _${_PYTHON_PREFIX}_REQUIRED_VERSION_MAJOR)
message (FATAL_ERROR "FindPython: INTERNAL ERROR")
endif()
if (_${_PYTHON_PREFIX}_REQUIRED_VERSION_MAJOR EQUAL 3)
- set(_${_PYTHON_PREFIX}_VERSIONS 3.9 3.8 3.7 3.6 3.5 3.4 3.3 3.2 3.1 3.0)
+ set(_${_PYTHON_PREFIX}_VERSIONS 3.10 3.9 3.8 3.7 3.6 3.5 3.4 3.3 3.2 3.1 3.0)
elseif (_${_PYTHON_PREFIX}_REQUIRED_VERSION_MAJOR EQUAL 2)
set(_${_PYTHON_PREFIX}_VERSIONS 2.7 2.6 2.5 2.4 2.3 2.2 2.1 2.0)
else()
diff --git a/src/boost/libs/python/src/exec.cpp b/src/boost/libs/python/src/exec.cpp
index 171c6f418..caa7d0864 100644
--- a/src/boost/libs/python/src/exec.cpp
+++ b/src/boost/libs/python/src/exec.cpp
@@ -106,10 +106,10 @@ object BOOST_PYTHON_DECL exec_file(char const *filename, object global, object l
char *f = const_cast<char *>(filename);
// Let python open the file to avoid potential binary incompatibilities.
#if PY_VERSION_HEX >= 0x03040000
- FILE *fs = _Py_fopen(f, "r");
+ FILE *fs = fopen(f, "r");
#elif PY_VERSION_HEX >= 0x03000000
PyObject *fo = Py_BuildValue("s", f);
- FILE *fs = _Py_fopen(fo, "r");
+ FILE *fs = fopen(fo, "r");
Py_DECREF(fo);
#else
PyObject *pyfile = PyFile_FromString(f, const_cast<char*>("r"));
--
2.30.0
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。