feat: new FindPython support (#2370)

* feat: FindPython support

* refactor: rename to PYBIND11_FINDPYTHON

* docs: Caps fixes

* feat: NOPYTHON mode

* test: check simple call

* docs: add changelog/upgrade guide

* feat: Support Python3 and Python2

* refactor: Use targets in tests

* fix: support CMake 3.4+

* feat: classic search also finds virtual environments

* docs: some updates from @wjakob's review

* fix: wrong name for QUIET mode variable, reported by @skoslowski

* refactor: cleaner output messaging

* fix: support debug Python's in FindPython mode too

* fixup! refactor: cleaner output messaging

* fix: missing pybind11_FOUND and pybind11_INCLUDE_DIR restored to subdir mode

* fix: nicer reporting of Python / PyPy

* fix: out-of-order variable fix

* docs: minor last-minute cleanup
This commit is contained in:
Henry Schreiner
2020-08-19 12:26:26 -04:00
committed by GitHub
parent 69821d9e75
commit 1729aae96f
24 changed files with 1117 additions and 395 deletions

View File

@@ -14,19 +14,22 @@ jobs:
strategy:
fail-fast: false
matrix:
runs-on: [ubuntu-latest, macos-latest]
runs-on: [ubuntu-latest, macos-latest, windows-latest]
arch: [x64]
cmake: [3.7, 3.18]
cmake: [3.18]
include:
- runs-on: windows-latest
- runs-on: ubuntu-latest
arch: x64
cmake: 3.18
cmake: 3.4
- runs-on: macos-latest
arch: x64
cmake: 3.7
# TODO: 3.8
- runs-on: windows-2016
arch: x86
cmake: 3.11
cmake: 3.8
- runs-on: windows-2016
arch: x86
@@ -63,3 +66,13 @@ jobs:
-DPYBIND11_WERROR=ON
-DDOWNLOAD_CATCH=ON
-DPYTHON_EXECUTABLE=$(python -c "import sys; print(sys.executable)")
- name: Build
working-directory: build dir
if: github.event_name == 'workflow_dispatch'
run: cmake --build . --config Release
- name: Test
working-directory: build dir
if: github.event_name == 'workflow_dispatch'
run: cmake --build . --config Release --target check