Skip to content
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

Use FindPython3.cmake rather than the deprecated FindPythonInterp.cmake #1784

Closed
wants to merge 2 commits into from

Conversation

mfdeakin
Copy link

@mfdeakin mfdeakin commented May 8, 2019

FindPythonInterp is deprecated and doesn't always find the Python executable (most notably the default installation in Fedora 30), so pybind11 should use FindPython3 or FindPython (if supporting Python2 is still desired; FindPython is version agnostic).

@mfdeakin
Copy link
Author

mfdeakin commented May 8, 2019

This is likely premature - FindPythonInterp was only deprecated last July, and the replacement implementations don't support PyPy yet

@eacousineau
Copy link
Contributor

Not completely sure, but this might be covered by @jamiesnape's PR: #1373

@wjakob
Copy link
Member

wjakob commented May 12, 2019

I'll close this for now, potentially to be revisited in the future.

@wjakob wjakob closed this May 12, 2019
@spflueger
Copy link

Hi,
currently we are experiencing problems with cmake 3.16, pybind11 2.4.3 and a python 3.8 venv. The problem is related to the fact that pybind11's CMake code cannot find the venv python. Going to the master branch fixes the problem (maybe because of PR #1974).
I think switching to FindPython would definitely make things easier with newer cmake and python versions. (cmake 3.10, pybind11 2.4.3, and python 3.8 venv works fine oddly enough)

@mfdeakin
Copy link
Author

I've updated my branch to default to using FindPython, but falling back to FindPythonInterp when FindPython fails (such as with PyPy). I think that's sufficient to address my own concerns

@henryiii
Copy link
Collaborator

This was fixed in #2370 , and CMake 3.18.2+ supports PyPy. :) (best also with PyPy 7.3.2+, as well)

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

Successfully merging this pull request may close these issues.

5 participants