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

Change pre-commit entry exe from python3 to python. #90634

Conversation

nlupugla
Copy link
Contributor

On my Windows 10 desktop, pre-commit was unable to find my Python installation because it looked for python3 instead of python. Changing the entry point in .pre-commit-config.yaml from python3 to python fixed the problem for me. I'm not sure if this is the best solution for other platforms and setups, so it would be great of others could test this change on their setups.

@nlupugla nlupugla requested a review from a team as a code owner April 13, 2024 17:11
@AThousandShips AThousandShips changed the title Changed pre-commit entry exe from python3 to python. Change pre-commit entry exe from python3 to python. Apr 13, 2024
@AThousandShips AThousandShips added this to the 4.3 milestone Apr 13, 2024
@@ -27,7 +27,7 @@ repos:
hooks:
- id: make-rst
name: make-rst
entry: python3 doc/tools/make_rst.py doc/classes modules platform --dry-run --color
Copy link
Member

Choose a reason for hiding this comment

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

This won't work on stock macOS, since only python3 is part of the default installation (homebrew and similar package managers usually have python symlink as well).

@chrisl8
Copy link
Contributor

chrisl8 commented Apr 14, 2024

At the risk of being annoying, I feel like this is something that should be solved in documentation, not the code. It is possible to solve this issue by creating various workarounds on the users system. A quick web search brought me a few Stack Exchange answers. If it helps, I am willing to test and compile some of these solutions into documentation somewhere.

@nlupugla
Copy link
Contributor Author

I think that's a good fallback if there turns out not to be a good scripting solution.

@akien-mga
Copy link
Member

Superseded by #92697.

@akien-mga akien-mga closed this Jun 3, 2024
@akien-mga akien-mga removed this from the 4.3 milestone Jun 3, 2024
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.

None yet

5 participants