diff options
-rw-r--r-- | .coveralls.yml | 3 | ||||
-rw-r--r-- | doc/man/scons.xml | 20 | ||||
-rw-r--r-- | src/CHANGES.txt | 3 | ||||
-rw-r--r-- | src/engine/SCons/CacheDir.py | 7 | ||||
-rw-r--r-- | src/engine/SCons/EnvironmentTests.py | 4 | ||||
-rw-r--r-- | src/engine/SCons/JobTests.py | 25 | ||||
-rw-r--r-- | src/engine/SCons/Util.py | 2 | ||||
-rw-r--r-- | src/engine/SCons/Warnings.py | 6 |
8 files changed, 31 insertions, 39 deletions
diff --git a/.coveralls.yml b/.coveralls.yml new file mode 100644 index 0000000..7a1d4a3 --- /dev/null +++ b/.coveralls.yml @@ -0,0 +1,3 @@ +service_name: travis-pro +repo_token: 1mUyRvK28QaLiKElPYgQGVlrUHxFhS037 + diff --git a/doc/man/scons.xml b/doc/man/scons.xml index bc3793f..c198957 100644 --- a/doc/man/scons.xml +++ b/doc/man/scons.xml @@ -1871,26 +1871,6 @@ These warnings are enabled by default.</para> </listitem> </varlistentry> <varlistentry> - <term>--warn=no-md5-module, --warn=no-no-md5-module</term> - <listitem> -<para>Enables or disables warnings about the version of Python -not having an MD5 checksum module available. -These warnings are enabled by default.</para> - - </listitem> - </varlistentry> - <varlistentry> - <term>--warn=no-metaclass-support, --warn=no-no-metaclass-support</term> - <listitem> -<para>Enables or disables warnings about the version of Python -not supporting metaclasses when the -<option>--debug=memoizer</option> -option is used. -These warnings are enabled by default.</para> - - </listitem> - </varlistentry> - <varlistentry> <term>--warn=no-object-count, --warn=no-no-object-count</term> <listitem> <para>Enables or disables warnings about the diff --git a/src/CHANGES.txt b/src/CHANGES.txt index 3716b39..40e1307 100644 --- a/src/CHANGES.txt +++ b/src/CHANGES.txt @@ -50,6 +50,9 @@ RELEASE 3.1.0.alpha.yyyymmdd - NEW DATE WILL BE INSERTED HERE From Zachary Tessler: - Fix incorrect warning for repeated identical builder calls that use overrides + From Andrew Featherstone + - Removed unused --warn options from the man page and source code. + RELEASE 3.0.0 - Mon, 18 Sep 2017 08:32:04 -0700 NOTE: This is a major release. You should expect that some targets may rebuild when upgrading. diff --git a/src/engine/SCons/CacheDir.py b/src/engine/SCons/CacheDir.py index 1690674..ac91c85 100644 --- a/src/engine/SCons/CacheDir.py +++ b/src/engine/SCons/CacheDir.py @@ -27,6 +27,7 @@ __doc__ = """ CacheDir support """ +import hashlib import json import os import stat @@ -134,12 +135,6 @@ warned = dict() class CacheDir(object): def __init__(self, path): - try: - import hashlib - except ImportError: - msg = "No hashlib or MD5 module available, CacheDir() not supported" - SCons.Warnings.warn(SCons.Warnings.NoMD5ModuleWarning, msg) - path = None self.path = path self.current_cache_debug = None self.debugFP = None diff --git a/src/engine/SCons/EnvironmentTests.py b/src/engine/SCons/EnvironmentTests.py index 229858f..7cd6015 100644 --- a/src/engine/SCons/EnvironmentTests.py +++ b/src/engine/SCons/EnvironmentTests.py @@ -139,10 +139,6 @@ class CLVar(UL): return UL.__add__(self, CLVar(other)) def __radd__(self, other): return UL.__radd__(self, CLVar(other)) - def __coerce__(self, other): - return (self, CLVar(other)) - - class DummyNode(object): def __init__(self, name): diff --git a/src/engine/SCons/JobTests.py b/src/engine/SCons/JobTests.py index dd2c7aa..6ae8e92 100644 --- a/src/engine/SCons/JobTests.py +++ b/src/engine/SCons/JobTests.py @@ -27,17 +27,40 @@ import random import math import sys import time +import os import TestUnit import SCons.Job +def get_cpu_nums(): + # Linux, Unix and MacOS: + if hasattr( os, "sysconf" ): + if "SC_NPROCESSORS_ONLN" in os.sysconf_names: + # Linux & Unix: + ncpus = os.sysconf( "SC_NPROCESSORS_ONLN" ) + if isinstance(ncpus, int) and ncpus > 0: + return ncpus + else: # OSX: + return int( os.popen2( "sysctl -n hw.ncpu")[1].read() ) + # Windows: + if "NUMBER_OF_PROCESSORS" in os.environ: + ncpus = int( os.environ[ "NUMBER_OF_PROCESSORS" ] ); + if ncpus > 0: + return ncpus + return 1 # Default + # a large number num_sines = 10000 # how many parallel jobs to perform for the test -num_jobs = 11 +num_jobs = get_cpu_nums()*2 + +# in case we werent able to detect num cpus for this test +# just make a hardcoded suffcient large number, though not future proof +if(num_jobs == 2): + num_jobs = 33 # how many tasks to perform for the test num_tasks = num_jobs*5 diff --git a/src/engine/SCons/Util.py b/src/engine/SCons/Util.py index 7ed9706..558441d 100644 --- a/src/engine/SCons/Util.py +++ b/src/engine/SCons/Util.py @@ -1029,8 +1029,6 @@ class CLVar(UserList): return UserList.__add__(self, CLVar(other)) def __radd__(self, other): return UserList.__radd__(self, CLVar(other)) - def __coerce__(self, other): - return (self, CLVar(other)) def __str__(self): return ' '.join(self.data) diff --git a/src/engine/SCons/Warnings.py b/src/engine/SCons/Warnings.py index 2495b89..e8158a4 100644 --- a/src/engine/SCons/Warnings.py +++ b/src/engine/SCons/Warnings.py @@ -74,12 +74,6 @@ class MisleadingKeywordsWarning(WarningOnByDefault): class MissingSConscriptWarning(WarningOnByDefault): pass -class NoMD5ModuleWarning(WarningOnByDefault): - pass - -class NoMetaclassSupportWarning(WarningOnByDefault): - pass - class NoObjectCountWarning(WarningOnByDefault): pass |