scons/fix-jN-for-python-37.patch

27 lines
955 B
Diff

--- a/src/engine/SCons/Script/Main.py
+++ b/src/engine/SCons/Script/Main.py
@@ -1253,7 +1253,11 @@ def _build_targets(fs, options, targets,
BuildTask.options = options
- python_has_threads = sysconfig.get_config_var('WITH_THREAD')
+ # 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.major > 3 or \
+ sys.version_info.major == 3 and sys.version_info.minor >= 7
+ python_has_threads = sysconfig.get_config_var('WITH_THREAD') or is_37_or_later
# to check if python configured with threads.
global num_jobs
num_jobs = options.num_jobs
--- a/runtest.py
+++ b/runtest.py
@@ -781,7 +781,7 @@ tests_passing = 0
tests_failing = 0
-def run_test(t, io_lock, async=True):
+def run_test(t, io_lock, run_async=True):
global tests_completed, tests_passing, tests_failing
header = ""
command_args = ['-tt']