Thanks to visit codestin.com
Credit goes to github.com

Skip to content

BUG: fix issue with git-version script, needs a shebang to run #24515

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
Aug 24, 2023

Conversation

rgommers
Copy link
Member

Closes gh-24514

@mattip
Copy link
Member

mattip commented Aug 24, 2023

Cool. I am pleasantly surprised shebang works properly on windows, does meson add the proper python to the PATH?

@rgommers
Copy link
Member Author

does meson add the proper python to the PATH?

Meson does do something to make sure that this works I believe, but don't ask me to explain. I just know how to fix it because I've dealt with this several times before - but forgot the gory details.

@mattip mattip merged commit b4c50e4 into numpy:main Aug 24, 2023
@mattip
Copy link
Member

mattip commented Aug 24, 2023

thanks @rgommers

@rgommers rgommers deleted the fix-gitversion branch August 24, 2023 12:40
@charris charris removed the 09 - Backport-Candidate PRs tagged should be backported label Aug 24, 2023
@eli-schwartz
Copy link

Meson does do something to make sure that this works I believe, but don't ask me to explain. I just know how to fix it because I've dealt with this several times before - but forgot the gory details.

It parses scripts and checks for a shebang, for portability reasons. Primarily to ensure things work as expected on Windows. When it spots the python3 shebang it offers the same guarantees that find_program('python3') does, i.e. it will always find some python3, and if need be it will use the sys.executable of meson itself.

@mattip
Copy link
Member

mattip commented Sep 1, 2023

When it spots the python3 shebang ...

nice, thanks

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

Successfully merging this pull request may close these issues.

BUG: meson.build runs gitversion.py with the wrong Python interpreter
4 participants