Skip to content

fix: make FindPython2 and FindPython3 work #2662

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 1 commit into from
Nov 15, 2020

Conversation

knarfS
Copy link
Contributor

@knarfS knarfS commented Nov 15, 2020

Description

When using FindPython3 (or FindPython2) from outside for a project that embeds the Python interpreter (with pybind11:embed), pybind11 isn't detecting Python correctly. This results in a working cmake execution, but with linking errors after building. FindPython is working though.
This is due to wrong target names (e.g. Python3::Python3 instead of Python3::Python) used in pybind11NewTools.cmake.

This was tested under Debian testing with an actual pybind11 git clone, cmake 3.16.3 and Python 3.8.5

Suggested changelog entry:

fix: make FindPython2 and FindPython3 work

Close #2664

@knarfS knarfS changed the title fix: make FindPython2 and FindPyth3 work fix: make FindPython2 and FindPython3 work Nov 15, 2020
Copy link
Collaborator

@henryiii henryiii left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks correct. We only test regular FindPython in CI.

@YannickJadoul
Copy link
Collaborator

This looks correct. We only test regular FindPython in CI.

I guess you're the CI expert, so if you feel like merging this, go ahead, @henryiii!

@YannickJadoul
Copy link
Collaborator

This also closes #2664, btw, as remarked there, already.

@henryiii henryiii merged commit f8b8107 into pybind:master Nov 15, 2020
@github-actions github-actions bot added the needs changelog Possibly needs a changelog entry label Nov 15, 2020
@knarfS
Copy link
Contributor Author

knarfS commented Nov 15, 2020

Thanks for merging so quickly! :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants