diff options
author | toonn <toonn@toonn.io> | 2020-06-22 12:28:34 +0200 |
---|---|---|
committer | toonn <toonn@toonn.io> | 2020-06-22 12:30:33 +0200 |
commit | b8b540916f14b8a4c48fac13c38daa9e3ebf2a3c (patch) | |
tree | 52918137f3a494d9669338f531b54fca64b24945 /Makefile | |
parent | 1654128f955b320354eea98a0bb6970a159ab16f (diff) | |
download | ranger-b8b540916f14b8a4c48fac13c38daa9e3ebf2a3c.tar.gz |
Default to python3 at install, fall back to python
Since `python` is supposed to always point to a python 2.x executable and python 2.x is no longer supported by the PSF, we should try to install with `python3` by default and fall back to `python` and then `python2`. Fixes #2006
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Makefile b/Makefile index d70728f6..82a6153a 100644 --- a/Makefile +++ b/Makefile @@ -8,9 +8,9 @@ VERSION_RIFLE = $(VERSION) SNAPSHOT_NAME ?= $(NAME)-$(VERSION)-$(shell git rev-parse HEAD | cut -b 1-8).tar.gz # Find suitable python version (need python >= 2.6 or 3.1): PYTHON ?= $(shell \ - (python -c 'import sys; sys.exit(sys.version < "2.6")' && \ + (which python3) \ + || (python -c 'import sys; sys.exit(sys.version < "2.6")' && \ which python) \ - || (which python3) \ || (python2 -c 'import sys; sys.exit(sys.version < "2.6")' && \ which python2) \ ) |