summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMathew Robinson <chasinglogic@gmail.com>2019-06-12 13:51:45 -0400
committerMathew Robinson <chasinglogic@gmail.com>2019-06-12 13:53:36 -0400
commit629826f3140932ef34ebeecc109086591fe28a60 (patch)
tree4f36341f6e8257bf6af2c0d068e71c7743b8875a
parentc1c761dd865308a15ff75748bf111d0a3ce366d6 (diff)
downloadmongo-629826f3140932ef34ebeecc109086591fe28a60.tar.gz
SERVER-41424 scons should fail early if invoked with wrong Python interpreter
(cherry picked from commit 6a8f5d33543088dbf39b26275fb2a90cbd466cf5)
-rwxr-xr-xbuildscripts/scons.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/buildscripts/scons.py b/buildscripts/scons.py
index b0b9cfa834e..dd443102edb 100755
--- a/buildscripts/scons.py
+++ b/buildscripts/scons.py
@@ -5,6 +5,11 @@ from __future__ import print_function
import os
import sys
+if sys.version_info != (2, 7):
+ print("This version of MongoDB can only be built with Python 2.7"
+ " you appear to be using version: %s" % sys.version)
+ sys.exit(1)
+
SCONS_VERSION = os.environ.get('SCONS_VERSION', "2.5.0")
mongodb_root = os.path.abspath(os.path.dirname(os.path.dirname(__file__)))