190dce4d38c5ff5333bea97d859d4e484e27edf0cTorne (Richard Coles)# Copyright 2012 The Chromium Authors. All rights reserved.
290dce4d38c5ff5333bea97d859d4e484e27edf0cTorne (Richard Coles)# Use of this source code is governed by a BSD-style license that can be
390dce4d38c5ff5333bea97d859d4e484e27edf0cTorne (Richard Coles)# found in the LICENSE file.
490dce4d38c5ff5333bea97d859d4e484e27edf0cTorne (Richard Coles)
590dce4d38c5ff5333bea97d859d4e484e27edf0cTorne (Richard Coles)# This file is (possibly, depending on python version) imported by
690dce4d38c5ff5333bea97d859d4e484e27edf0cTorne (Richard Coles)# gyp_chromium when GYP_PARALLEL=1 and it creates sub-processes
790dce4d38c5ff5333bea97d859d4e484e27edf0cTorne (Richard Coles)# through the multiprocessing library.
890dce4d38c5ff5333bea97d859d4e484e27edf0cTorne (Richard Coles)
990dce4d38c5ff5333bea97d859d4e484e27edf0cTorne (Richard Coles)# Importing in Python 2.6 (fixed in 2.7) on Windows doesn't search for
1090dce4d38c5ff5333bea97d859d4e484e27edf0cTorne (Richard Coles)# imports that don't end in .py (and aren't directories with an
1190dce4d38c5ff5333bea97d859d4e484e27edf0cTorne (Richard Coles)# __init__.py). This wrapper makes "import gyp_chromium" work with
1290dce4d38c5ff5333bea97d859d4e484e27edf0cTorne (Richard Coles)# those old versions and makes it possible to execute gyp_chromium.py
1390dce4d38c5ff5333bea97d859d4e484e27edf0cTorne (Richard Coles)# directly on Windows where the extension is useful.
1490dce4d38c5ff5333bea97d859d4e484e27edf0cTorne (Richard Coles)
1590dce4d38c5ff5333bea97d859d4e484e27edf0cTorne (Richard Coles)import os
1690dce4d38c5ff5333bea97d859d4e484e27edf0cTorne (Richard Coles)
1790dce4d38c5ff5333bea97d859d4e484e27edf0cTorne (Richard Coles)path = os.path.abspath(os.path.split(__file__)[0])
1890dce4d38c5ff5333bea97d859d4e484e27edf0cTorne (Richard Coles)execfile(os.path.join(path, 'gyp_chromium'))
19