scons/fix-jN-for-python-37.patch
Tomáš Chvátal 7d5d49b536 Accepting request 640640 from home:mcepl:work
- Make package not to be noarch (bsc#1109755)
- Make package multibuild for separate testing
- Block failing tests (and block %check section completely on
  non-Intel archs, as the tests are apparently not designed for
  that).
- Fix patches from the upstream to improve compatbiilty:
    fix-jN-for-python-37.patch
    fix-rpm-tests-for-newer-rpmbuild.patch
    no_deprecated_asserts.patch
    no_time-clock.patch
    removed_splitunc.patch
    replace_TestSuite_main.patch
    stop_custom_OrderedDict.patch
- Remove replace-imp-with-importlib.patch for now (to stabilize
  the package first)

OBS-URL: https://build.opensuse.org/request/show/640640
OBS-URL: https://build.opensuse.org/package/show/devel:tools:building/scons?expand=0&rev=64
2018-10-08 19:36:14 +00:00

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']