linode-cli
linode-cli copied to clipboard
Edit Makefile to fix issue #78 and allow py2/py3
As described in Issue #78, the existing makefile expects "python" to point to python2. However, on many modern distros "python" actually points to python3 (and python2 is available by "python2"). This changes the python2 command to "python2" if the python version detected is python3. (This could create a different issue if python2 isn't available with "python2" ... but I believe that it should be in 99-100% of cases?)
Python2 has reached it's end of life. Thinking we should address this now 🙃
is anyone can comment on that. i want to use linode-cli on arch linux where python is python 3 and python2 is python 2. why cly need two version of python at all?
Building the CLI includes pickling a python representation of the OpenAPI spec to save time at runtime (it takes several seconds to parse the spec, where loading the pickle is near instant). Unfortunately, the pickle data format changed between python2 and python3, so in order to ship a universal package, data for both python versions needed to be built.
I will look into this again and see if we have low enough usage of python2 now that we can remove support for it (although unfortunately, despite it being end-of-life, python
on many systems is still python2).
Fully switched to py3, outdated.