2017-03-28 17:04:13 +02:00
|
|
|
#!/usr/bin/env python2
|
|
|
|
|
|
|
|
from __future__ import print_function
|
2016-07-12 04:17:22 +02:00
|
|
|
|
|
|
|
import os
|
|
|
|
import sys
|
|
|
|
|
|
|
|
SCONS_VERSION = os.environ.get('SCONS_VERSION', "2.5.0")
|
|
|
|
|
2017-03-24 18:30:19 +01:00
|
|
|
mongodb_root = os.path.abspath(os.path.dirname(os.path.dirname(__file__)))
|
2017-03-28 17:04:13 +02:00
|
|
|
scons_dir = os.path.join(mongodb_root, 'src', 'third_party','scons-' + SCONS_VERSION,
|
|
|
|
'scons-local-' + SCONS_VERSION)
|
|
|
|
|
|
|
|
if not os.path.exists(scons_dir):
|
|
|
|
print("Could not find SCons in '%s'" % (scons_dir))
|
|
|
|
sys.exit(1)
|
|
|
|
|
|
|
|
sys.path = [scons_dir] + sys.path
|
2016-07-12 04:17:22 +02:00
|
|
|
|
2017-03-28 17:04:13 +02:00
|
|
|
try:
|
|
|
|
import SCons.Script
|
|
|
|
except ImportError:
|
|
|
|
print("Could not find SCons in '%s'" % (scons_dir))
|
|
|
|
sys.exit(1)
|
2017-03-09 19:47:54 +01:00
|
|
|
|
2017-03-28 17:04:13 +02:00
|
|
|
SCons.Script.main()
|