kivy: Add a check for python version in `make` and gracefully exit rather than fail on python version 2.
Software Versions
- Python:
- OS: OSX 10.15.6
- Kivy: master 27 sept 2020
- Kivy installation method: clone master and
make
Describe the bug
Make fails with python
referring to python2 does not fail gracefully
Expected behavior
kivy % make
python setup.py build_ext —inplace
Python version 2 is not supported, please use python3
To Reproduce
> git clone github.com/kivy/kivy
> cd kivy
> make
Code and Logs and screenshots
kivy % make
python setup.py build_ext --inplace
File "setup.py", line 1050
def glob_paths(*patterns, excludes=('.pyc', )):
^
SyntaxError: invalid syntax
make: *** [build] Error 1
Additional context Add any other context about the problem here.
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Comments: 15 (15 by maintainers)
Commits related to this issue
- move setup.py to msetup.py inline with suggestions from #7109, closes #7109 — committed to kivy/kivy by deleted user 4 years ago
Honestly my personal use case is using make, that’s why I wanted to add the Make only solution. This is good enough for users that compile from git.
For the setup.py change I fear doing it this way is begging for consequences down the line….
But you wouldn’t use setup.py directly these days, except after you have a working install, for normal users. So we just need to make sure that installing with pip returns a clear error. We don’t have to make it return a nice error for users who don’t use pip, because hopefully they would know about Python2 not being supported.
Even editable install is installed with pip initially. So we just need to add the appropriate metada and hopefully pip not even try to run setup.py if the min version is violated.
On Sun, Sep 27, 2020, 11:06 AM Gabriel Pettier notifications@github.com wrote: