-
Notifications
You must be signed in to change notification settings - Fork 2.2k
feat: new FindPython support #2370
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
19 commits
Select commit
Hold shift + click to select a range
0689ca3
feat: FindPython support
henryiii c76c1fb
refactor: rename to PYBIND11_FINDPYTHON
henryiii 2591bed
docs: Caps fixes
henryiii 426f3f3
feat: NOPYTHON mode
henryiii 892dfae
test: check simple call
henryiii 7739d45
docs: add changelog/upgrade guide
henryiii 6f4bb75
feat: Support Python3 and Python2
henryiii 2d197bc
refactor: Use targets in tests
henryiii 9b391f2
fix: support CMake 3.4+
henryiii 9cdebea
feat: classic search also finds virtual environments
henryiii fe7b390
docs: some updates from @wjakob's review
henryiii e194692
fix: wrong name for QUIET mode variable, reported by @skoslowski
henryiii 997d64a
refactor: cleaner output messaging
henryiii c6c8484
fix: support debug Python's in FindPython mode too
henryiii a275fca
fixup! refactor: cleaner output messaging
henryiii d00b7b2
fix: missing pybind11_FOUND and pybind11_INCLUDE_DIR restored to subd…
henryiii ea4a89e
fix: nicer reporting of Python / PyPy
henryiii a7fa066
fix: out-of-order variable fix
henryiii 8e47d2f
docs: minor last-minute cleanup
henryiii File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -31,11 +31,13 @@ jobs: | |
arch: x64 | ||
max-cxx-std: 17 | ||
dev: false | ||
args: "-DPYBIND11_FINDPYTHON=ON" | ||
- runs-on: macos-latest | ||
python: 3.7 | ||
arch: x64 | ||
max-cxx-std: 17 | ||
dev: false | ||
args: "-DPYBIND11_FINDPYTHON=ON" | ||
- runs-on: windows-2016 | ||
python: 3.7 | ||
arch: x86 | ||
|
@@ -46,6 +48,7 @@ jobs: | |
arch: x64 | ||
max-cxx-std: 17 | ||
dev: false | ||
args: "-DPYBIND11_FINDPYTHON=ON" | ||
- runs-on: windows-latest | ||
python: 3.7 | ||
arch: x64 | ||
|
@@ -89,7 +92,7 @@ jobs: | |
dev: false | ||
|
||
|
||
name: "🐍 ${{ matrix.python }} • ${{ matrix.runs-on }} • ${{ matrix.arch }}" | ||
name: "🐍 ${{ matrix.python }} • ${{ matrix.runs-on }} • ${{ matrix.arch }} ${{ matrix.args }}" | ||
runs-on: ${{ matrix.runs-on }} | ||
continue-on-error: ${{ matrix.dev }} | ||
|
||
|
@@ -106,6 +109,9 @@ jobs: | |
if: runner.os != 'macOS' | ||
run: echo "::set-env name=BOOST_ROOT::$BOOST_ROOT_1_72_0" | ||
|
||
- name: Update CMake | ||
uses: jwlawson/[email protected] | ||
|
||
- name: Cache wheels | ||
if: runner.os == 'macOS' | ||
uses: actions/cache@v2 | ||
|
@@ -120,15 +126,15 @@ jobs: | |
- name: Prepare env | ||
run: python -m pip install -r tests/requirements.txt | ||
|
||
- name: Configure C++11 | ||
- name: Configure C++11 ${{ matrix.args }} | ||
shell: bash | ||
run: > | ||
cmake -S . -B build | ||
-DPYBIND11_WERROR=ON | ||
-DDOWNLOAD_CATCH=ON | ||
-DDOWNLOAD_EIGEN=ON | ||
-DCMAKE_CXX_STANDARD=11 | ||
-DPYTHON_EXECUTABLE=$(python -c "import sys; print(sys.executable)") | ||
${{ matrix.args }} | ||
|
||
- name: Build C++11 | ||
run: cmake --build build -j 2 | ||
|
@@ -140,17 +146,17 @@ jobs: | |
run: cmake --build build --target cpptest -j 2 | ||
|
||
- name: Interface test C++11 | ||
run: cmake --build build --target test_cmake_build | ||
run: cmake --build build --target test_cmake_build -v | ||
|
||
- name: Configure C++${{ matrix.max-cxx-std }} | ||
- name: Configure C++${{ matrix.max-cxx-std }} ${{ matrix.args }} | ||
shell: bash | ||
run: > | ||
cmake -S . -B build2 | ||
-DPYBIND11_WERROR=ON | ||
-DDOWNLOAD_CATCH=ON | ||
-DDOWNLOAD_EIGEN=ON | ||
-DCMAKE_CXX_STANDARD=${{ matrix.max-cxx-std }} | ||
-DPYTHON_EXECUTABLE=$(python -c "import sys; print(sys.executable)") | ||
${{ matrix.args }} | ||
|
||
- name: Build C++${{ matrix.max-cxx-std }} | ||
run: cmake --build build2 -j 2 | ||
|
@@ -350,14 +356,14 @@ jobs: | |
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- name: Install requirements | ||
- name: Install system requirements | ||
run: apk add doxygen python3-dev | ||
|
||
- name: Ensure pip | ||
run: python3 -m ensurepip | ||
|
||
- name: Install python docs requirements | ||
run: python3 -m pip install "sphinx<3" sphinx_rtd_theme breathe==4.13.1 pytest setuptools | ||
- name: Install docs & setup requirements | ||
run: python3 -m pip install -r docs/requirements.txt pytest setuptools | ||
|
||
- name: Build docs | ||
run: python3 -m sphinx -W -b html docs docs/.build | ||
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -32,7 +32,7 @@ MANIFEST | |
.*.swp | ||
.DS_Store | ||
/dist | ||
/build | ||
/build* | ||
.cache/ | ||
sosize-*.txt | ||
pybind11Config*.cmake | ||
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.