-
-
Notifications
You must be signed in to change notification settings - Fork 528
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
sage-bootstrap-python doesn't work when pyenv shadows all usable pythons in PATH #33901
Comments
Branch: u/gh-k3w1k0d3r/pyfix |
Commit: |
New commits:
|
comment:5
Could you please open a bug report with pyenv? It's pretty wild that they install a broken python command in PATH |
comment:6
yeah sure do you think I should give up on this ticket or should I still work on it to make the build not fail? |
comment:7
well I'll fix it because it's not too bad, I just used bash-only syntax and for some reason when I tested it locally it still worked |
comment:8
Yes, we can merge a workaround in Sage. But the bug is in pyenv |
Branch pushed to git repo; I updated commit sha1. New commits:
|
comment:10
great thank you |
Branch pushed to git repo; I updated commit sha1. New commits:
|
comment:13
Loops like this are better done with IFS |
Branch pushed to git repo; I updated commit sha1. New commits:
|
comment:15
Replying to @mkoeppe:
alright I'll change it thanks |
Branch pushed to git repo; I updated commit sha1. New commits:
|
comment:17
I realized my system sh was a symlink to bash instead of dash, which is why my local tests worked. I've now properly tested with dash, so hopefully now everything works. |
comment:18
|
comment:19
it seems that the issue with pyenv is most likely a misconfiguration on my end of some sort |
comment:20
yeah the quotes issue is fixed on my system, but the old script still doesn't work for me. I assume it's because of #29285 |
comment:22
shouldn't the colon be in a different place? |
comment:23
I think ":$NEW_PATH$path" also works if that's what you mean. |
comment:24
I think the constructed path should neither begin nor end with |
comment:25
okay I'll get rid of the extra |
comment:26
Also could you make the pattern |
Branch pushed to git repo; I updated commit sha1. New commits:
|
comment:28
Well that's now a bit too specific. For example, on macOS, user home directories live in |
Branch pushed to git repo; I updated commit sha1. New commits:
|
comment:30
Replying to @mkoeppe:
yeah I didn't think that through very well |
comment:31
It doesn't matter very much here, but note that this is not the default value of |
Branch pushed to git repo; I updated commit sha1. New commits:
|
comment:33
it seems odd that this failed a startup time test right? it doesn't seem like this script ever gets executed after it's already been configured |
comment:34
The startup time test is safe to ignore. It is much too optimistic regarding the precision of its measurements. |
comment:35
Thanks for this contribution. |
Reviewer: Matthias Koeppe |
Changed branch from u/gh-k3w1k0d3r/pyfix to |
The script sage-bootstrap-python attempts to call a command like
"/path/to/python" -c "..."
Pyenv python treats "python" differently from just python, giving the output:
/home/.../.pyenv/shims/python: line 1: 2: command not found
With pyenv installed and configured normally, the script will never check a non-pyenv version of python, and thus will fail to find a suitable python. My fix was to attempt to remove pyenv from the PATH before testing for python.
I've only confirmed this behavior on arch linux
Component: build: configure
Keywords: bootstrap, python, pyenv
Author: Julien Grijalva
Branch/Commit:
dedc9c2
Reviewer: Matthias Koeppe
Issue created by migration from https://trac.sagemath.org/ticket/33901
The text was updated successfully, but these errors were encountered: