Commit 2a2f5220 by Henry Schreiner Committed by GitHub

fix: find_import didn't work properly for classic tools (#2550)

* fix: find_import didn't work properly for classic tools

* ci: fix all files not being checked in style run
parent 14112077
...@@ -22,7 +22,7 @@ jobs: ...@@ -22,7 +22,7 @@ jobs:
- uses: pre-commit/action@v2.0.0 - uses: pre-commit/action@v2.0.0
with: with:
# Slow hooks are marked with manual - slow is okay here, run them too # Slow hooks are marked with manual - slow is okay here, run them too
extra_args: --hook-stage manual extra_args: --hook-stage manual --all-files
clang-tidy: clang-tidy:
name: Clang-Tidy name: Clang-Tidy
......
...@@ -6,4 +6,3 @@ install with ``find_package(pybind11 CONFIG)``. The interface provided in ...@@ -6,4 +6,3 @@ install with ``find_package(pybind11 CONFIG)``. The interface provided in
either case is functionally identical. either case is functionally identical.
.. cmake-module:: ../../tools/pybind11Config.cmake.in .. cmake-module:: ../../tools/pybind11Config.cmake.in
...@@ -196,7 +196,7 @@ else() ...@@ -196,7 +196,7 @@ else()
endif() endif()
# --------------------- pybind11_check_import ------------------------------- # --------------------- pybind11_find_import -------------------------------
if(NOT _pybind11_nopython) if(NOT _pybind11_nopython)
# Check to see if modules are importable. Use REQUIRED to force an error if # Check to see if modules are importable. Use REQUIRED to force an error if
......
...@@ -94,9 +94,10 @@ execute_process( ...@@ -94,9 +94,10 @@ execute_process(
ERROR_VARIABLE _PYTHON_MODULE_EXTENSION_ERR ERROR_VARIABLE _PYTHON_MODULE_EXTENSION_ERR
OUTPUT_STRIP_TRAILING_WHITESPACE) OUTPUT_STRIP_TRAILING_WHITESPACE)
if (_PYTHON_MODULE_EXTENSION STREQUAL "") if(_PYTHON_MODULE_EXTENSION STREQUAL "")
message(FATAL_ERROR "pybind11 could not query the module file extension, likely the 'distutils'" message(
"package is not installed. Full error message:\n${_PYTHON_MODULE_EXTENSION_ERR}") FATAL_ERROR "pybind11 could not query the module file extension, likely the 'distutils'"
"package is not installed. Full error message:\n${_PYTHON_MODULE_EXTENSION_ERR}")
endif() endif()
# This needs to be available for the pybind11_extension function # This needs to be available for the pybind11_extension function
......
...@@ -191,4 +191,6 @@ function(pybind11_add_module target_name) ...@@ -191,4 +191,6 @@ function(pybind11_add_module target_name)
endfunction() endfunction()
# Provide general way to call common Python commands in "common" file. # Provide general way to call common Python commands in "common" file.
set(_Python PYTHON) set(_Python
PYTHON
CACHE INTERNAL "" FORCE)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment