diff options
| author | Zeno Albisser <zeno.albisser@digia.com> | 2013-08-15 21:46:11 +0200 |
|---|---|---|
| committer | Zeno Albisser <zeno.albisser@digia.com> | 2013-08-15 21:46:11 +0200 |
| commit | 679147eead574d186ebf3069647b4c23e8ccace6 (patch) | |
| tree | fc247a0ac8ff119f7c8550879ebb6d3dd8d1ff69 /chromium/tools/python/google/platform_utils.py | |
Initial import.
Diffstat (limited to 'chromium/tools/python/google/platform_utils.py')
| -rw-r--r-- | chromium/tools/python/google/platform_utils.py | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/chromium/tools/python/google/platform_utils.py b/chromium/tools/python/google/platform_utils.py new file mode 100644 index 00000000000..50bfb70cc08 --- /dev/null +++ b/chromium/tools/python/google/platform_utils.py @@ -0,0 +1,23 @@ +# Copyright (c) 2011 The Chromium Authors. All rights reserved. +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. + +"""Platform-specific utilities and pseudo-constants + +Any functions whose implementations or values differ from one platform to +another should be defined in their respective platform_utils_<platform>.py +modules. The appropriate one of those will be imported into this module to +provide callers with a common, platform-independent interface. +""" + +import sys + +# We may not support the version of Python that a user has installed (Cygwin +# especially has had problems), but we'll allow the platform utils to be +# included in any case so we don't get an import error. +if sys.platform in ('cygwin', 'win32'): + from platform_utils_win import * +elif sys.platform == 'darwin': + from platform_utils_mac import * +elif sys.platform.startswith('linux'): + from platform_utils_linux import * |
