linode-cli icon indicating copy to clipboard operation
linode-cli copied to clipboard

Edit Makefile to fix issue #78 and allow py2/py3

Open danieldjewell opened this issue 5 years ago • 3 comments

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?)

danieldjewell avatar Oct 31 '19 18:10 danieldjewell

Python2 has reached it's end of life. Thinking we should address this now 🙃

patthiel avatar Jan 02 '20 15:01 patthiel

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?

alex19EP avatar Nov 09 '20 20:11 alex19EP

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).

Dorthu avatar Nov 09 '20 20:11 Dorthu

Fully switched to py3, outdated.

jriddle-linode avatar Feb 21 '23 16:02 jriddle-linode