summaryrefslogtreecommitdiffstats
path: root/src/engine/SCons/Script/Main.py
diff options
context:
space:
mode:
authorWilliam Deegan <bill@baddogconsulting.com>2018-10-09 20:23:51 (GMT)
committerWilliam Deegan <bill@baddogconsulting.com>2018-10-09 20:23:51 (GMT)
commitade84bc59db524fbccd670bfadefa786407c7c0b (patch)
treea3da7c7e0fa926ad41f01ae09ab709c660c67bd9 /src/engine/SCons/Script/Main.py
parenta1c6873e2f84240feab9a923ccc1ebcda3160339 (diff)
parente342d031c2a80cc7eb27ca139b7adee2d37a8216 (diff)
downloadSCons-ade84bc59db524fbccd670bfadefa786407c7c0b.zip
SCons-ade84bc59db524fbccd670bfadefa786407c7c0b.tar.gz
SCons-ade84bc59db524fbccd670bfadefa786407c7c0b.tar.bz2
Merge remote-tracking branch 'upstream/master' into subst_rewrite
Diffstat (limited to 'src/engine/SCons/Script/Main.py')
-rw-r--r--src/engine/SCons/Script/Main.py9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/engine/SCons/Script/Main.py b/src/engine/SCons/Script/Main.py
index c810634..6516a15 100644
--- a/src/engine/SCons/Script/Main.py
+++ b/src/engine/SCons/Script/Main.py
@@ -48,6 +48,7 @@ import sys
import time
import traceback
import sysconfig
+import platform
import SCons.CacheDir
import SCons.Debug
@@ -622,7 +623,7 @@ def _SConstruct_exists(dirname='', repositories=[], filelist=None):
current directory.
"""
if not filelist:
- filelist = ['SConstruct', 'Sconstruct', 'sconstruct']
+ filelist = ['SConstruct', 'Sconstruct', 'sconstruct', 'SConstruct.py', 'Sconstruct.py', 'sconstruct.py']
for file in filelist:
sfile = os.path.join(dirname, file)
if os.path.isfile(sfile):
@@ -1253,7 +1254,11 @@ def _build_targets(fs, options, targets, target_top):
BuildTask.options = options
- python_has_threads = sysconfig.get_config_var('WITH_THREAD')
+ is_pypy = platform.python_implementation() == 'PyPy'
+ # As of 3.7, python removed support for threadless platforms.
+ # See https://www.python.org/dev/peps/pep-0011/
+ is_37_or_later = sys.version_info >= (3, 7)
+ python_has_threads = sysconfig.get_config_var('WITH_THREAD') or is_pypy or is_37_or_later
# to check if python configured with threads.
global num_jobs
num_jobs = options.num_jobs