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

find_program('python3')/python/python2 should use import('python').find_installation() #3856

Closed
nirbheek opened this issue Jul 9, 2018 · 2 comments · Fixed by #9900
Closed
Labels

Comments

@nirbheek
Copy link
Member

nirbheek commented Jul 9, 2018

This will make build files cross-platform by default since python is called different things on different platforms, and people shouldn't need to know that they need to use the python module to get the right behaviour.

@Tachi107
Copy link
Contributor

Tachi107 commented Jan 29, 2022

This was implemented in 067ff7e, right?

If so, I think it would be helpful to have a note in the find_program() or import('python').find_installation() documentation, so that people stop manually calling import('python').find_installation() when what they really need is a functional python3 interpreter

Tachi107 added a commit to Tachi107/meson that referenced this issue Jan 29, 2022
@eli-schwartz
Copy link
Member

The spirit of this issue is fulfilled: the python module find_installation does a bunch of things to find python, and find_program only does one of those things, but regardless it is sufficient for finding a suitable interpreter to run scripts.

The literal title of the issue will never be fulfilled: find_installation is used for compiling and installing python modules, is slow (costs an import) and slower as well (runs introspection scripts for sysconfig/distutils info) so we are never going to actually expose that as an implementation detail of find_program('python3'). :D

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

Successfully merging a pull request may close this issue.

3 participants