-
-
Notifications
You must be signed in to change notification settings - Fork 57
fix: symlink to python3 instead of python_real #37
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
Conversation
| exec "${PYTHON_BIN}" "$@" | ||
| else | ||
| PYTHON_REAL="${VIRTUAL_ENV}/bin/python_real" | ||
| PYTHON_REAL="${VIRTUAL_ENV}/bin/python3" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
some comments or test cases so we know why it has to be this way? (similar to the commit description?)
|
It's hard to tell from the description, but this might be what the For lack of a better thing to link to: https://github.com/python/cpython/blob/8aa9d40b00741213c5a53b1ae15509998893ae31/Misc/python.man#L578-L582 which says
|
|
Hmm, I'm not sure about |
|
This is what I get on my local Mac: |
|
Hmm yeah, this is different. So I guess you could also set the symlink target to the output of e.g. |
|
Hm yeah good point. That might help in breaking out into the wrong |
9122b3c to
3241d2c
Compare
|
I like this fix better as it also resolves the issue where the autodetecting toolchain could in some cases pick up the hosts |
On MacOS (or at least what I'm running), it has some odd semantics around how
/usr/bin/pythonbehaves which appear to depend on the name of the binary itself 🙄If the autodetecting toolchain links
/usr/bin/python, then the shim will callpython_real, which in turn gets called by whatever the binary at/usr/bin/pythonis, and aspython_realisn't a binary it can call, it decides it needs to install Xcodes command line utilities. This of course doesn't help, and the cycle continues.Instead, link to
python3, and only link inpythoninto the venv/bin as the others were kinda extraneous anyway.