Debian Codegraph @

debian/patches/0002-Drop-old-FindPython.cmake.patch

raw
1 From: Jochen Sprickerhof <[email protected]>
2 Date: Mon, 28 Nov 2022 09:14:48 +0100
3 Subject: Drop old FindPython.cmake
4
5 Not compatible wit new CMake.
6 ---
7 tools/cmake/Modules/FindPython.cmake | 57 ------------------------------------
8 1 file changed, 57 deletions(-)
9 delete mode 100644 tools/cmake/Modules/FindPython.cmake
10
11 diff --git a/tools/cmake/Modules/FindPython.cmake b/tools/cmake/Modules/FindPython.cmake
12 deleted file mode 100644
13 index 9a79e79..0000000
14 --- a/tools/cmake/Modules/FindPython.cmake
15 +++ /dev/null
16 @@ -1,57 +0,0 @@
17 -#
18 -# Licensed to the Apache Software Foundation (ASF) under one
19 -# or more contributor license agreements. See the NOTICE file
20 -# distributed with this work for additional information
21 -# regarding copyright ownership. The ASF licenses this file
22 -# to you under the Apache License, Version 2.0 (the
23 -# "License"); you may not use this file except in compliance
24 -# with the License. You may obtain a copy of the License at
25 -#
26 -# http://www.apache.org/licenses/LICENSE-2.0
27 -#
28 -# Unless required by applicable law or agreed to in writing,
29 -# software distributed under the License is distributed on an
30 -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
31 -# KIND, either express or implied. See the License for the
32 -# specific language governing permissions and limitations
33 -# under the License.
34 -#
35 -
36 -# This is a wrapper hack purely so that we can use FindPython
37 -# with cmake 2.8.12 and its supplied older modules
38 -
39 -if (POLICY CMP0094) # https://cmake.org/cmake/help/latest/policy/CMP0094.html
40 - cmake_policy(SET CMP0094 NEW) # FindPython should return the first matching Python on PATH
41 -endif ()
42 -
43 -if (DEFINED PYTHON_EXECUTABLE AND DEFINED Python_EXECUTABLE)
44 - message(FATAL_ERROR "Both PYTHON_EXECUTABLE and Python_EXECUTABLE are defined. Define at most one of those.")
45 -endif ()
46 -
47 -# FindPython was added in CMake 3.12, but there it always returned
48 -# newest Python on the entire PATH. We want to use the first one.
49 -if (CMAKE_VERSION VERSION_LESS "3.15.0")
50 - if (DEFINED Python_EXECUTABLE)
51 - set(PYTHON_EXECUTABLE ${Python_EXECUTABLE})
52 - endif ()
53 -
54 - find_package (PythonInterp ${Python_FIND_VERSION} REQUIRED)
55 - # forward compatibility with FindPython
56 - set(Python_VERSION_STRING "${PYTHON_VERSION_STRING}")
57 - set(Python_EXECUTABLE "${PYTHON_EXECUTABLE}")
58 - # for completeness, these are not actually used now
59 - set(Python_VERSION_MAJOR "${PYTHON_VERSION_MAJOR}")
60 - set(Python_VERSION_MINOR "${PYTHON_VERSION_MINOR}")
61 - set(Python_VERSION_PATCH "${PYTHON_VERSION_PATCH}")
62 -
63 - find_package (PythonLibs ${PYTHON_VERSION_STRING} EXACT)
64 - set(Python_Development_FOUND "${PYTHONLIBS_FOUND}")
65 - set(Python_INCLUDE_DIRS "${PYTHON_INCLUDE_PATH}")
66 - set(Python_LIBRARIES "${PYTHON_LIBRARIES}")
67 -else ()
68 - if (DEFINED PYTHON_EXECUTABLE)
69 - set(Python_EXECUTABLE ${PYTHON_EXECUTABLE})
70 - endif ()
71 -
72 - include(${CMAKE_ROOT}/Modules/FindPython.cmake)
73 -endif ()