diff options
author | Wojciech Siewierski <wojciech.siewierski@onet.pl> | 2018-08-19 21:43:08 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-08-19 21:43:08 +0200 |
commit | c940298fa67c2d97b46caebcacc46b0cd699fbb9 (patch) | |
tree | 415d033119ca6d0e5fd67a336abcf8f0a503cce7 | |
parent | 5f33450debfdb21477b7a9068c4b8a84ffd6c355 (diff) | |
parent | 5edd2c0f59d7f73c38b49f528d3578dca9e5162b (diff) | |
download | ranger-c940298fa67c2d97b46caebcacc46b0cd699fbb9.tar.gz |
Merge pull request #1235 from hektr/patch-1
Update PYTHON variable
-rw-r--r-- | Makefile | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/Makefile b/Makefile index 6cd1ec8f..79b4f9d4 100644 --- a/Makefile +++ b/Makefile @@ -7,9 +7,16 @@ NAME_RIFLE = rifle 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 python || which python3.3 || which python3.2 || which python3.1 || \ - which python3 || which python2.7 || which python2.6) +PYTHON ?= $(shell \ + (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) \ + ) +ifeq ($(PYTHON),) + $(error No suitable python found.) +endif SETUPOPTS ?= '--record=install_log.txt' DOCDIR ?= doc/pydoc DESTDIR ?= / |