kivy / kivy-ios

Toolchain for compiling Python / Kivy / other libraries for iOS
https://kivy.org/docs/guide/packaging-ios.html
MIT License
776 stars 240 forks source link

Use `sys.executable` instead of `sh.python` #745

Closed misl6 closed 2 years ago

misl6 commented 2 years ago

Fixes the following error:

File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/kivy_ios/toolchain.py", line 1059, in cythonize_file
    shprint(sh.python, cythonize_script, filename)
  File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/sh.py", line 3548, in getattr
    return self.env[name]
  File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/sh.py", line 3330, in getitem__
    raise CommandNotFound(k)
sh.CommandNotFound: python
misl6 commented 2 years ago

Thanks 🙏 What's the reason our CI didn't catch that earlier? Is it because we don't run on Monterey?

On Apple Silicon we use pyenv so python is actually python3, and on GitHub-hosted runners actions/setup-python does something similar.

I'm on macOS Monterey, but never noticed as I only use virtualenvs 😃

AndreMiras commented 2 years ago

OK clear, thanks for the extra context, that makes sense, nice that you could catch this bug