Title: [105931] trunk/Tools
Revision
105931
Author
[email protected]
Date
2012-01-25 15:11:46 -0800 (Wed, 25 Jan 2012)

Log Message

Remove Python 2.5 support from WebKit
https://bugs.webkit.org/show_bug.cgi?id=71593

Reviewed by Adam Barth.

Just removing support from this one core file.
I'll commit the rest of the (large) change once we've
gone 24 hours and seen that no bots have exploded.
We can roll out this one change if we break bots
and then roll in the rest once those bots are fixed.

* Scripts/webkitpy/common/system/executive.py:
(Executive.cpu_count):

Modified Paths

Diff

Modified: trunk/Tools/ChangeLog (105930 => 105931)


--- trunk/Tools/ChangeLog	2012-01-25 22:43:19 UTC (rev 105930)
+++ trunk/Tools/ChangeLog	2012-01-25 23:11:46 UTC (rev 105931)
@@ -1,3 +1,19 @@
+2012-01-25  Eric Seidel  <[email protected]>
+
+        Remove Python 2.5 support from WebKit
+        https://bugs.webkit.org/show_bug.cgi?id=71593
+
+        Reviewed by Adam Barth.
+
+        Just removing support from this one core file.
+        I'll commit the rest of the (large) change once we've
+        gone 24 hours and seen that no bots have exploded.
+        We can roll out this one change if we break bots
+        and then roll in the rest once those bots are fixed.
+
+        * Scripts/webkitpy/common/system/executive.py:
+        (Executive.cpu_count):
+
 2012-01-25  Hajime Morita  <[email protected]>
 
         ENABLE_SHADOW_DOM should be available via build-webkit --shadow-dom

Modified: trunk/Tools/Scripts/webkitpy/common/system/executive.py (105930 => 105931)


--- trunk/Tools/Scripts/webkitpy/common/system/executive.py	2012-01-25 22:43:19 UTC (rev 105930)
+++ trunk/Tools/Scripts/webkitpy/common/system/executive.py	2012-01-25 23:11:46 UTC (rev 105931)
@@ -27,12 +27,7 @@
 # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
 # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 
-try:
-    # This API exists only in Python 2.6 and higher.  :(
-    import multiprocessing
-except ImportError:
-    multiprocessing = None
-
+import multiprocessing
 import ctypes
 import errno
 import logging
@@ -160,21 +155,7 @@
         return child_output
 
     def cpu_count(self):
-        if multiprocessing:
-            return multiprocessing.cpu_count()
-        # Darn.  We don't have the multiprocessing package.
-        system_name = platform.system()
-        if system_name == "Darwin":
-            return int(self.run_command(["sysctl", "-n", "hw.ncpu"]))
-        elif system_name == "Windows":
-            return int(os.environ.get('NUMBER_OF_PROCESSORS', 1))
-        elif system_name == "Linux":
-            num_cores = os.sysconf("SC_NPROCESSORS_ONLN")
-            if isinstance(num_cores, int) and num_cores > 0:
-                return num_cores
-        # This quantity is a lie but probably a reasonable guess for modern
-        # machines.
-        return 2
+        return multiprocessing.cpu_count()
 
     @staticmethod
     def interpreter_for_script(script_path, fs=None):
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to