[python3] Add support for Python_ARTIFACTS_SUFFIX to CMake Wrapper.#47284
[python3] Add support for Python_ARTIFACTS_SUFFIX to CMake Wrapper.#47284BillyONeal merged 9 commits intomicrosoft:masterfrom
Conversation
| # CMake 4.0+ introduced Python_ARTIFACT_PREFIX to add a suffix (yes, a suffix) | ||
| # to the results of find_package(Python), so we need to handle that here. |
There was a problem hiding this comment.
I guess it is called prefix because it's also a prefix for the type of an artifact (i.e. _EXECUTABLE, _LIBRARY etc.).
There was a problem hiding this comment.
That's true. I was thinking about how it add a suffix to the target namespaces, eg Python3_HOST::Interpreter.
|
I would probably start with a test port. A CMakeLists.txt which outlines expected behavior, validates this PR and prevents regression in the future. |
|
I've been maintaining a fairly simple test since I rewrote this port years ago. I'm not aware of vcpkg itself having any tests beyond the CI builders, hence this being an external test I monitor. |
|
We have a growing collection of test ports here: https://github.com/microsoft/vcpkg/tree/master/scripts/test_ports . You could add a small test there and it gets built during CI. |
93e1697 to
4f794de
Compare
|
Ugh, a test seems to be mostly useless because CI is not actually running CMake 4.0. |
|
Well, for now the test could fetch and use CMake 4.0. |
04da949 to
f9dd2e2
Compare
f9dd2e2 to
01eca11
Compare
|
I've changed the test to work on all versions of CMake back to 3.12. I had a look at the cmake-user test port, and that level of machinery is way outside the scope of what the test needs to do, IMO. If there were a standardized way to request a different version of CMake, then it would definitely be reasonable to test on multiple CMake versions in CI, but the cmake-user port is excessive for what we're trying to accomplish. We don't need 200 more lines of code in the test port that aren't related to what we're actually testing. I can verify that the CMake 4.0+ parts work, and the test can run on CMake 4.0 when CI gets CMake 4.0. |
|
It is perfectly okay to do a more minimal thing in a specific port. Most test ports are minimal, and they are still very useful, in CI and locally. |
5149442 to
442f046
Compare
This problem was exposed by the ci test on x64-linux.
3d29b5b to
e0226ca
Compare
Disable tests for microsoft#47284 for now.
|
Unfortunately in my testing this does not appear to function, in #47326 macOS would be our first CMake >4.x platform and the test explodes with: CMake Error at /opt/homebrew/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:227 (message):
Could NOT find Python (missing: Python_MEOW_INCLUDE_DIRS)
Python_MEOW_LIBRARIES Interpreter Development Development.Module
Develop.Embedso I have had to disable the test in 2d8849a I observe that |
|
That's interesting. I tested this PR pretty thoroughly on Windows and Linux, so the test itself should be working, AFAIK. I don't have CMake 4.0 installed on my mac. It's a bit of a clunker, so it will take some time for me to do much toward figuring out what is wrong on macOS.
This is all correct. CMake's FindPython support script uses the underscored variable names for its |
|
The failure repros for me on Windows too if I do this: diff --git a/scripts/test_ports/vcpkg-ci-python3/project/CMakeLists.txt b/scripts/test_ports/vcpkg-ci-python3/project/CMakeLists.txt
index 5f3e6c299e..6339bfa052 100644
--- a/scripts/test_ports/vcpkg-ci-python3/project/CMakeLists.txt
+++ b/scripts/test_ports/vcpkg-ci-python3/project/CMakeLists.txt
@@ -1,32 +1,32 @@
cmake_minimum_required(VERSION 3.12)
project(python3-test)
-if("${CMAKE_VERSION}" VERSION_LESS "4.0")
- # We need to opt-out of CMP0148 to be able to test the pre-CMake 3.12 Python
- # find modules. The old policy is deprecated, so, at some point, this aspect
- # of the test will have to go away.
- if(POLICY CMP0148)
- cmake_policy(SET CMP0148 OLD)
- endif()
+set(Python_ARTIFACTS_PREFIX "_MEOW")
- # The purpose of this test is to ensure that we get the expected values
- # from the finders, not crosscompiling. So, let's not even go there.
- # These find_package() calls aren't required because FindPythonInterp
- # seems to not return a result in CI. Probably because FindPythonInterp
- # prefers the system Python instead of the executable from the python3
- # port.
- if(NOT CMAKE_CROSSCOMPILING)
- find_package(PythonInterp)
- endif()
- find_package(PythonLibs)
+# We need to opt-out of CMP0148 to be able to test the pre-CMake 3.12 Python
+# find modules. The old policy is deprecated, so, at some point, this aspect
+# of the test will have to go away.
+if(POLICY CMP0148)
+ cmake_policy(SET CMP0148 OLD)
+endif()
- # The old find modules should NOT be prefixed.
- if(DEFINED PythonInterp_MEOW_FOUND OR DEFINED PYTHON_MEOW_EXECUTABLE)
- message(FATAL_ERROR "FindPythonInterp prefixed the result variables")
- endif()
- if(DEFINED PythonLibs_MEOW_FOUND OR DEFINED PYTHON_MEOW_LIBRARIES)
- message(FATAL_ERROR "FindPythonLibs prefixed the result variables")
- endif()
+# The purpose of this test is to ensure that we get the expected values
+# from the finders, not crosscompiling. So, let's not even go there.
+# These find_package() calls aren't required because FindPythonInterp
+# seems to not return a result in CI. Probably because FindPythonInterp
+# prefers the system Python instead of the executable from the python3
+# port.
+if(NOT CMAKE_CROSSCOMPILING)
+ find_package(PythonInterp)
+endif()
+find_package(PythonLibs)
+
+# The old find modules should NOT be prefixed.
+if(DEFINED PythonInterp_MEOW_FOUND OR DEFINED PYTHON_MEOW_EXECUTABLE)
+ message(FATAL_ERROR "FindPythonInterp prefixed the result variables")
+endif()
+if(DEFINED PythonLibs_MEOW_FOUND OR DEFINED PYTHON_MEOW_LIBRARIES)
+ message(FATAL_ERROR "FindPythonLibs prefixed the result variables")
endif()
function(test_result NAME TYPE EXPECTED UNEXPECTED)
@@ -55,8 +55,13 @@ endif()
# The new find modules should be prefixed if CMake is 4.0+
find_package(Python REQUIRED COMPONENTS ${_INTERPRETER} Development)
-set(EXPECTED_PYTHON Python)
-set(UNEXPECTED_PYTHON Python_MEOW)
+if(CMAKE_VERSION VERSION_GREATER_EQUAL 4.0)
+ set(EXPECTED_PYTHON Python_MEOW)
+ set(UNEXPECTED_PYTHON Python)
+else()
+ set(EXPECTED_PYTHON Python)
+ set(UNEXPECTED_PYTHON Python_MEOW)
+endif()
test_new_finder(${EXPECTED_PYTHON} ${UNEXPECTED_PYTHON})
# Also test non-prefixed. Use Python3:: to avoid conflicts with Python_MEOW::
diff --git a/scripts/vcpkg-tools.json b/scripts/vcpkg-tools.json
index f31e7699cd..7ed5555733 100644
--- a/scripts/vcpkg-tools.json
+++ b/scripts/vcpkg-tools.json
@@ -23,11 +23,11 @@
"name": "cmake",
"os": "windows",
"arch": "amd64",
- "version": "3.30.1",
- "executable": "cmake-3.30.1-windows-i386/bin/cmake.exe",
- "url": "https://github.com/Kitware/CMake/releases/download/v3.30.1/cmake-3.30.1-windows-i386.zip",
- "sha512": "0b74bd4222064cfb6e42838987704eb21d57ad5f7bbd87714ab570f1d107fa19bd2f14316475338518292bc377bf38b581a07c73267a775cd385bbd1800879b4",
- "archive": "cmake-3.30.1-windows-i386.zip"
+ "version": "4.1.1",
+ "executable": "cmake-4.0.4-windows-x86_64/bin/cmake.exe",
+ "url": "https://github.com/Kitware/CMake/releases/download/v4.1.1/cmake-4.1.1-windows-x86_64.zip",
+ "sha512": "e7f629230e5813b97a1dd97dc050843c1b65179c76db8c07c991afd3846b1d7e833ca68b81736ac0d2e47f4c9e43d0a512ac13299a8f3c4b184c733dccb3c02c",
+ "archive": "cmake-4.1.1-windows-x86_64.zip"
},
{
"name": "cmake", |
[1/2] "C:/Program Files/CMake/bin/cmake.exe" -E chdir ".." "C:/Program Files/CMake/bin/cmake.exe" "C:/Dev/vcpkg/scripts/test_ports/vcpkg-ci-python3/project" "-G" "Ninja" "-DCMAKE_BUILD_TYPE=Release" "-DCMAKE_INSTALL_PREFIX=C:/Dev/vcpkg/packages/vcpkg-ci-python3_x64-windows" "-DFETCHCONTENT_FULLY_DISCONNECTED=ON" "-DCMAKE_MAKE_PROGRAM=C:/Program Files/Microsoft Visual Studio/2022/Enterprise/Common7/IDE/CommonExtensions/Microsoft/CMake/Ninja/ninja.exe" "-DBUILD_SHARED_LIBS=ON" "-DVCPKG_CHAINLOAD_TOOLCHAIN_FILE=C:/Dev/vcpkg/scripts/toolchains/windows.cmake" "-DVCPKG_TARGET_TRIPLET=x64-windows" "-DVCPKG_SET_CHARSET_FLAG=ON" "-DVCPKG_PLATFORM_TOOLSET=v143" "-DCMAKE_EXPORT_NO_PACKAGE_REGISTRY=ON" "-DCMAKE_FIND_PACKAGE_NO_PACKAGE_REGISTRY=ON" "-DCMAKE_FIND_PACKAGE_NO_SYSTEM_PACKAGE_REGISTRY=ON" "-DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=TRUE" "-DCMAKE_VERBOSE_MAKEFILE=ON" "-DVCPKG_APPLOCAL_DEPS=OFF" "-DCMAKE_TOOLCHAIN_FILE=C:/Dev/vcpkg/scripts/buildsystems/vcpkg.cmake" "-DCMAKE_ERROR_ON_ABSOLUTE_INSTALL_DESTINATION=ON" "-DVCPKG_CXX_FLAGS=" "-DVCPKG_CXX_FLAGS_RELEASE=" "-DVCPKG_CXX_FLAGS_DEBUG=" "-DVCPKG_C_FLAGS=" "-DVCPKG_C_FLAGS_RELEASE=" "-DVCPKG_C_FLAGS_DEBUG=" "-DVCPKG_CRT_LINKAGE=dynamic" "-DVCPKG_LINKER_FLAGS=" "-DVCPKG_LINKER_FLAGS_RELEASE=" "-DVCPKG_LINKER_FLAGS_DEBUG=" "-DVCPKG_TARGET_ARCHITECTURE=x64" "-DCMAKE_INSTALL_LIBDIR:STRING=lib" "-DCMAKE_INSTALL_BINDIR:STRING=bin" "-D_VCPKG_ROOT_DIR=C:/Dev/vcpkg" "-D_VCPKG_INSTALLED_DIR=C:/Dev/vcpkg/installed" "-DVCPKG_MANIFEST_INSTALL=OFF"
FAILED: ../CMakeCache.txt
"C:/Program Files/CMake/bin/cmake.exe" -E chdir ".." "C:/Program Files/CMake/bin/cmake.exe" "C:/Dev/vcpkg/scripts/test_ports/vcpkg-ci-python3/project" "-G" "Ninja" "-DCMAKE_BUILD_TYPE=Release" "-DCMAKE_INSTALL_PREFIX=C:/Dev/vcpkg/packages/vcpkg-ci-python3_x64-windows" "-DFETCHCONTENT_FULLY_DISCONNECTED=ON" "-DCMAKE_MAKE_PROGRAM=C:/Program Files/Microsoft Visual Studio/2022/Enterprise/Common7/IDE/CommonExtensions/Microsoft/CMake/Ninja/ninja.exe" "-DBUILD_SHARED_LIBS=ON" "-DVCPKG_CHAINLOAD_TOOLCHAIN_FILE=C:/Dev/vcpkg/scripts/toolchains/windows.cmake" "-DVCPKG_TARGET_TRIPLET=x64-windows" "-DVCPKG_SET_CHARSET_FLAG=ON" "-DVCPKG_PLATFORM_TOOLSET=v143" "-DCMAKE_EXPORT_NO_PACKAGE_REGISTRY=ON" "-DCMAKE_FIND_PACKAGE_NO_PACKAGE_REGISTRY=ON" "-DCMAKE_FIND_PACKAGE_NO_SYSTEM_PACKAGE_REGISTRY=ON" "-DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=TRUE" "-DCMAKE_VERBOSE_MAKEFILE=ON" "-DVCPKG_APPLOCAL_DEPS=OFF" "-DCMAKE_TOOLCHAIN_FILE=C:/Dev/vcpkg/scripts/buildsystems/vcpkg.cmake" "-DCMAKE_ERROR_ON_ABSOLUTE_INSTALL_DESTINATION=ON" "-DVCPKG_CXX_FLAGS=" "-DVCPKG_CXX_FLAGS_RELEASE=" "-DVCPKG_CXX_FLAGS_DEBUG=" "-DVCPKG_C_FLAGS=" "-DVCPKG_C_FLAGS_RELEASE=" "-DVCPKG_C_FLAGS_DEBUG=" "-DVCPKG_CRT_LINKAGE=dynamic" "-DVCPKG_LINKER_FLAGS=" "-DVCPKG_LINKER_FLAGS_RELEASE=" "-DVCPKG_LINKER_FLAGS_DEBUG=" "-DVCPKG_TARGET_ARCHITECTURE=x64" "-DCMAKE_INSTALL_LIBDIR:STRING=lib" "-DCMAKE_INSTALL_BINDIR:STRING=bin" "-D_VCPKG_ROOT_DIR=C:/Dev/vcpkg" "-D_VCPKG_INSTALLED_DIR=C:/Dev/vcpkg/installed" "-DVCPKG_MANIFEST_INSTALL=OFF"
-- The C compiler identification is MSVC 19.44.35217.0
-- The CXX compiler identification is MSVC 19.44.35217.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: C:/Program Files/Microsoft Visual Studio/2022/Enterprise/VC/Tools/MSVC/14.44.35207/bin/Hostx64/x64/cl.exe - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: C:/Program Files/Microsoft Visual Studio/2022/Enterprise/VC/Tools/MSVC/14.44.35207/bin/Hostx64/x64/cl.exe - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
CMake Warning (dev) at C:/Dev/vcpkg/installed/x64-windows/share/pythoninterp/vcpkg-cmake-wrapper.cmake:10 (_find_package):
Policy CMP0148 is not set: The FindPythonInterp and FindPythonLibs modules
are removed. Run "cmake --help-policy CMP0148" for policy details. Use
the cmake_policy command to set the policy and suppress this warning.
Call Stack (most recent call first):
C:/Dev/vcpkg/scripts/buildsystems/vcpkg.cmake:852 (include)
CMakeLists.txt:20 (find_package)
This warning is for project developers. Use -Wno-dev to suppress it.
-- Found PythonInterp: C:/Program Files/Python313/python.exe (found version "3.13.7")
CMake Warning (dev) at C:/Dev/vcpkg/scripts/buildsystems/vcpkg.cmake:898 (_find_package):
Policy CMP0148 is not set: The FindPythonInterp and FindPythonLibs modules
are removed. Run "cmake --help-policy CMP0148" for policy details. Use
the cmake_policy command to set the policy and suppress this warning.
Call Stack (most recent call first):
CMakeLists.txt:22 (find_package)
This warning is for project developers. Use -Wno-dev to suppress it.
-- Found PythonLibs: C:/Program Files/Python313/libs/python313.lib (found version "3.13.7")
CMake Error at C:/Program Files/CMake/share/cmake-4.1/Modules/FindPackageHandleStandardArgs.cmake:227 (message):
Could NOT find Python (missing: Python_MEOW_LIBRARIES
Python_MEOW_INCLUDE_DIRS Interpreter Development Development.Module
Development.Embed)
Call Stack (most recent call first):
C:/Program Files/CMake/share/cmake-4.1/Modules/FindPackageHandleStandardArgs.cmake:591 (_FPHSA_FAILURE_MESSAGE)
C:/Program Files/CMake/share/cmake-4.1/Modules/FindPython.cmake:727 (find_package_handle_standard_args)
C:/Dev/vcpkg/installed/x64-windows/share/python/vcpkg-cmake-wrapper.cmake:83 (_find_package)
C:/Dev/vcpkg/scripts/buildsystems/vcpkg.cmake:852 (include)
CMakeLists.txt:57 (find_package)
-- Configuring incomplete, errors occurred!
[2/2] "C:/Program Files/CMake/bin/cmake.exe" -E chdir "../../x64-windows-dbg" "C:/Program Files/CMake/bin/cmake.exe" "C:/Dev/vcpkg/scripts/test_ports/vcpkg-ci-python3/project" "-G" "Ninja" "-DCMAKE_BUILD_TYPE=Debug" "-DCMAKE_INSTALL_PREFIX=C:/Dev/vcpkg/packages/vcpkg-ci-python3_x64-windows/debug" "-DFETCHCONTENT_FULLY_DISCONNECTED=ON" "-DCMAKE_MAKE_PROGRAM=C:/Program Files/Microsoft Visual Studio/2022/Enterprise/Common7/IDE/CommonExtensions/Microsoft/CMake/Ninja/ninja.exe" "-DBUILD_SHARED_LIBS=ON" "-DVCPKG_CHAINLOAD_TOOLCHAIN_FILE=C:/Dev/vcpkg/scripts/toolchains/windows.cmake" "-DVCPKG_TARGET_TRIPLET=x64-windows" "-DVCPKG_SET_CHARSET_FLAG=ON" "-DVCPKG_PLATFORM_TOOLSET=v143" "-DCMAKE_EXPORT_NO_PACKAGE_REGISTRY=ON" "-DCMAKE_FIND_PACKAGE_NO_PACKAGE_REGISTRY=ON" "-DCMAKE_FIND_PACKAGE_NO_SYSTEM_PACKAGE_REGISTRY=ON" "-DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=TRUE" "-DCMAKE_VERBOSE_MAKEFILE=ON" "-DVCPKG_APPLOCAL_DEPS=OFF" "-DCMAKE_TOOLCHAIN_FILE=C:/Dev/vcpkg/scripts/buildsystems/vcpkg.cmake" "-DCMAKE_ERROR_ON_ABSOLUTE_INSTALL_DESTINATION=ON" "-DVCPKG_CXX_FLAGS=" "-DVCPKG_CXX_FLAGS_RELEASE=" "-DVCPKG_CXX_FLAGS_DEBUG=" "-DVCPKG_C_FLAGS=" "-DVCPKG_C_FLAGS_RELEASE=" "-DVCPKG_C_FLAGS_DEBUG=" "-DVCPKG_CRT_LINKAGE=dynamic" "-DVCPKG_LINKER_FLAGS=" "-DVCPKG_LINKER_FLAGS_RELEASE=" "-DVCPKG_LINKER_FLAGS_DEBUG=" "-DVCPKG_TARGET_ARCHITECTURE=x64" "-DCMAKE_INSTALL_LIBDIR:STRING=lib" "-DCMAKE_INSTALL_BINDIR:STRING=bin" "-D_VCPKG_ROOT_DIR=C:/Dev/vcpkg" "-D_VCPKG_INSTALLED_DIR=C:/Dev/vcpkg/installed" "-DVCPKG_MANIFEST_INSTALL=OFF"
FAILED: ../../x64-windows-dbg/CMakeCache.txt
"C:/Program Files/CMake/bin/cmake.exe" -E chdir "../../x64-windows-dbg" "C:/Program Files/CMake/bin/cmake.exe" "C:/Dev/vcpkg/scripts/test_ports/vcpkg-ci-python3/project" "-G" "Ninja" "-DCMAKE_BUILD_TYPE=Debug" "-DCMAKE_INSTALL_PREFIX=C:/Dev/vcpkg/packages/vcpkg-ci-python3_x64-windows/debug" "-DFETCHCONTENT_FULLY_DISCONNECTED=ON" "-DCMAKE_MAKE_PROGRAM=C:/Program Files/Microsoft Visual Studio/2022/Enterprise/Common7/IDE/CommonExtensions/Microsoft/CMake/Ninja/ninja.exe" "-DBUILD_SHARED_LIBS=ON" "-DVCPKG_CHAINLOAD_TOOLCHAIN_FILE=C:/Dev/vcpkg/scripts/toolchains/windows.cmake" "-DVCPKG_TARGET_TRIPLET=x64-windows" "-DVCPKG_SET_CHARSET_FLAG=ON" "-DVCPKG_PLATFORM_TOOLSET=v143" "-DCMAKE_EXPORT_NO_PACKAGE_REGISTRY=ON" "-DCMAKE_FIND_PACKAGE_NO_PACKAGE_REGISTRY=ON" "-DCMAKE_FIND_PACKAGE_NO_SYSTEM_PACKAGE_REGISTRY=ON" "-DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=TRUE" "-DCMAKE_VERBOSE_MAKEFILE=ON" "-DVCPKG_APPLOCAL_DEPS=OFF" "-DCMAKE_TOOLCHAIN_FILE=C:/Dev/vcpkg/scripts/buildsystems/vcpkg.cmake" "-DCMAKE_ERROR_ON_ABSOLUTE_INSTALL_DESTINATION=ON" "-DVCPKG_CXX_FLAGS=" "-DVCPKG_CXX_FLAGS_RELEASE=" "-DVCPKG_CXX_FLAGS_DEBUG=" "-DVCPKG_C_FLAGS=" "-DVCPKG_C_FLAGS_RELEASE=" "-DVCPKG_C_FLAGS_DEBUG=" "-DVCPKG_CRT_LINKAGE=dynamic" "-DVCPKG_LINKER_FLAGS=" "-DVCPKG_LINKER_FLAGS_RELEASE=" "-DVCPKG_LINKER_FLAGS_DEBUG=" "-DVCPKG_TARGET_ARCHITECTURE=x64" "-DCMAKE_INSTALL_LIBDIR:STRING=lib" "-DCMAKE_INSTALL_BINDIR:STRING=bin" "-D_VCPKG_ROOT_DIR=C:/Dev/vcpkg" "-D_VCPKG_INSTALLED_DIR=C:/Dev/vcpkg/installed" "-DVCPKG_MANIFEST_INSTALL=OFF"
-- The C compiler identification is MSVC 19.44.35217.0
-- The CXX compiler identification is MSVC 19.44.35217.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: C:/Program Files/Microsoft Visual Studio/2022/Enterprise/VC/Tools/MSVC/14.44.35207/bin/Hostx64/x64/cl.exe - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: C:/Program Files/Microsoft Visual Studio/2022/Enterprise/VC/Tools/MSVC/14.44.35207/bin/Hostx64/x64/cl.exe - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
CMake Warning (dev) at C:/Dev/vcpkg/installed/x64-windows/share/pythoninterp/vcpkg-cmake-wrapper.cmake:10 (_find_package):
Policy CMP0148 is not set: The FindPythonInterp and FindPythonLibs modules
are removed. Run "cmake --help-policy CMP0148" for policy details. Use
the cmake_policy command to set the policy and suppress this warning.
Call Stack (most recent call first):
C:/Dev/vcpkg/scripts/buildsystems/vcpkg.cmake:852 (include)
CMakeLists.txt:20 (find_package)
This warning is for project developers. Use -Wno-dev to suppress it.
-- Found PythonInterp: C:/Program Files/Python313/python.exe (found version "3.13.7")
CMake Warning (dev) at C:/Dev/vcpkg/scripts/buildsystems/vcpkg.cmake:898 (_find_package):
Policy CMP0148 is not set: The FindPythonInterp and FindPythonLibs modules
are removed. Run "cmake --help-policy CMP0148" for policy details. Use
the cmake_policy command to set the policy and suppress this warning.
Call Stack (most recent call first):
CMakeLists.txt:22 (find_package)
This warning is for project developers. Use -Wno-dev to suppress it.
-- Found PythonLibs: C:/Program Files/Python313/libs/python313.lib (found version "3.13.7")
CMake Error at C:/Program Files/CMake/share/cmake-4.1/Modules/FindPackageHandleStandardArgs.cmake:227 (message):
Could NOT find Python (missing: Python_MEOW_LIBRARIES
Python_MEOW_INCLUDE_DIRS Interpreter Development Development.Module
Development.Embed)
Call Stack (most recent call first):
C:/Program Files/CMake/share/cmake-4.1/Modules/FindPackageHandleStandardArgs.cmake:591 (_FPHSA_FAILURE_MESSAGE)
C:/Program Files/CMake/share/cmake-4.1/Modules/FindPython.cmake:727 (find_package_handle_standard_args)
C:/Dev/vcpkg/installed/x64-windows/share/python/vcpkg-cmake-wrapper.cmake:83 (_find_package)
C:/Dev/vcpkg/scripts/buildsystems/vcpkg.cmake:852 (include)
CMakeLists.txt:57 (find_package)
-- Configuring incomplete, errors occurred!
ninja: build stopped: subcommand failed.
|
|
Ok, I think I've got it figured out. There appears to be a mistake in the vcpkg-cmake-wrapper that's preventing the test from working as submitted here. I will submit a fix shortly. |
|
Should be fixed by #47494 |
CMake 4.0 added the ability to add a suffix to all of the result targets and variables of the FindPython module. This pull request updates vcpkg-cmake-wrapper.cmake to support
Python_ARTIFACT_SUFFIX../vcpkg x-add-version --alland committing the result.