From 4ee9aa03f5395c823c1bf8642c86415e263aaf63 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Thu, 16 Jan 2025 09:37:15 +0000 Subject: [PATCH] style: pre-commit fixes --- tools/FindPythonLibsNew.cmake | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/tools/FindPythonLibsNew.cmake b/tools/FindPythonLibsNew.cmake index 9948f07ac9..b1d9441723 100644 --- a/tools/FindPythonLibsNew.cmake +++ b/tools/FindPythonLibsNew.cmake @@ -200,14 +200,15 @@ if(PYBIND11_PYTHONLIBS_OVERWRITE OR NOT DEFINED PYTHON_MODULE_DEBUG_POSTFIX) endif() if(PYBIND11_PYTHONLIBS_OVERWRITE OR NOT DEFINED PYTHON_MODULE_EXTENSION) get_filename_component(PYTHON_MODULE_EXTENSION "${_PYTHON_MODULE_EXT_SUFFIX}" EXT) - if (NOT "$ENV{SETUPTOOLS_EXT_SUFFIX}" STREQUAL "" - AND NOT "$ENV{SETUPTOOLS_EXT_SUFFIX}" STREQUAL "${PYTHON_MODULE_EXTENSION}") - message(AUTHOR_WARNING, - "SETUPTOOLS_EXT_SUFFIX is set to \"$ENV{SETUPTOOLS_EXT_SUFFIX}\", " - "but the auto-calculated Python extension suffix is \"${PYTHON_MODULE_EXTENSION}\". " - "This may cause problems when importing the Python extensions. " - "If you are using cross-compiling Python, you may need to " - "set PYTHON_MODULE_EXTENSION manually.") + if(NOT "$ENV{SETUPTOOLS_EXT_SUFFIX}" STREQUAL "" AND NOT "$ENV{SETUPTOOLS_EXT_SUFFIX}" STREQUAL + "${PYTHON_MODULE_EXTENSION}") + message( + AUTHOR_WARNING, + "SETUPTOOLS_EXT_SUFFIX is set to \"$ENV{SETUPTOOLS_EXT_SUFFIX}\", " + "but the auto-calculated Python extension suffix is \"${PYTHON_MODULE_EXTENSION}\". " + "This may cause problems when importing the Python extensions. " + "If you are using cross-compiling Python, you may need to " + "set PYTHON_MODULE_EXTENSION manually.") endif() endif()