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

"py -3" command does not work when pyenv is used. #1028

Closed
sosuts opened this issue May 18, 2023 · 2 comments · Fixed by #1030
Closed

"py -3" command does not work when pyenv is used. #1028

sosuts opened this issue May 18, 2023 · 2 comments · Fixed by #1030

Comments

@sosuts
Copy link
Contributor

sosuts commented May 18, 2023

Hi! Thank you for the great package!
I have one question related to windows user.

If windows user installed Python with pyenv, I think Python would be launched by "python" command.
Therefore, "py -3" will cause an error in FD_HAS_PY3().
How about returning "python" when ENV["PYENV"] exists?

function PY()
if "PYTHON3" keys(ENV)
ENV["PYTHON3"]
else
if Sys.iswindows()
"py -3"
else
"python3"
end
end
end

@tlienart
Copy link
Owner

tlienart commented May 22, 2023

Hello!

Yes I think what you say makes sense. Maybe we could just add an if around line 6, would you be interested in a PR?

Note: the Python path in Franklin is bound to disappear. It is only used to run the minification (this script: https://github.com/tlienart/Franklin.jl/blob/master/src/scripts/minify.py relying on css_html_js_minify which is unmaintained and not great but simple); it's actually not particularly helpful so the next planned major release gets rid of Python, and of that dependency)

In short: if this is bothering you and you'd like to have a small fix for it for now, I'll gladly merge a PR to this effect, I was just commenting on the fact that in the medium term this will all go away 😄

@sosuts
Copy link
Contributor Author

sosuts commented Jun 5, 2023

I apologize for the delayed response!
I sent a small PR 😉

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

Successfully merging a pull request may close this issue.

2 participants