Skip to content

Commit

Permalink
style: pre-commit fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
pre-commit-ci[bot] committed Jan 16, 2025
1 parent 517079b commit 4ee9aa0
Showing 1 changed file with 9 additions and 8 deletions.
17 changes: 9 additions & 8 deletions tools/FindPythonLibsNew.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -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()

Expand Down

0 comments on commit 4ee9aa0

Please sign in to comment.