]> git-server-git.apps.pok.os.sepia.ceph.com Git - rocksdb.git/commitdiff
Only check for python location once (#7123)
authorAdam Retter <adam.retter@googlemail.com>
Tue, 14 Jul 2020 23:00:05 +0000 (16:00 -0700)
committerAndrew Kryczka <andrewkr@fb.com>
Thu, 16 Jul 2020 00:51:52 +0000 (17:51 -0700)
Summary:
This fixes an issue introduced in 0c56fc4 whereby the location of Python is evaluated many times and leads to excessive logging of unknown python locations of CentOS 6.

The location is now only checked once.

Pull Request resolved: https://github.com/facebook/rocksdb/pull/7123

Reviewed By: zhichao-cao

Differential Revision: D22532274

Pulled By: ajkr

fbshipit-source-id: cade71b4b46e9a23d63ecb4dd36a4ac8ae217970

Makefile

index 77066fbe8739df3b3b184db1ec46423ada4d77f5..332b7fa18f31ce2b5b9e44a30e75476032670cc5 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -9,7 +9,9 @@
 BASH_EXISTS := $(shell which bash)
 SHELL := $(shell which bash)
 # Default to python3. Some distros like CentOS 8 do not have `python`.
-PYTHON?=$(shell which python3 || which python || echo python3)
+ifeq ($(origin PYTHON), undefined)
+       PYTHON := $(shell which python3 || which python || echo python3)
+endif
 export PYTHON
 
 CLEAN_FILES = # deliberately empty, so we can append below.