14a1836050df3cd554f68708e0097769386e74f40fbarchard@google.com#!/usr/bin/env python 24a1836050df3cd554f68708e0097769386e74f40fbarchard@google.com# 34a1836050df3cd554f68708e0097769386e74f40fbarchard@google.com# Copyright 2014 The LibYuv Project Authors. All rights reserved. 44a1836050df3cd554f68708e0097769386e74f40fbarchard@google.com# 54a1836050df3cd554f68708e0097769386e74f40fbarchard@google.com# Use of this source code is governed by a BSD-style license 64a1836050df3cd554f68708e0097769386e74f40fbarchard@google.com# that can be found in the LICENSE file in the root of the source 74a1836050df3cd554f68708e0097769386e74f40fbarchard@google.com# tree. An additional intellectual property rights grant can be found 84a1836050df3cd554f68708e0097769386e74f40fbarchard@google.com# in the file PATENTS. All contributing project authors may 94a1836050df3cd554f68708e0097769386e74f40fbarchard@google.com# be found in the AUTHORS file in the root of the source tree. 104a1836050df3cd554f68708e0097769386e74f40fbarchard@google.com 11d5a521cd236d4c95fda36257ed4b991e534e9b73kjellander@google.com 12d5a521cd236d4c95fda36257ed4b991e534e9b73kjellander@google.com# This script is a modified copy of the src/build/gyp_chromium.py file. 13d5a521cd236d4c95fda36257ed4b991e534e9b73kjellander@google.com# It is needed for parallel processing. 14d5a521cd236d4c95fda36257ed4b991e534e9b73kjellander@google.com 154a1836050df3cd554f68708e0097769386e74f40fbarchard@google.com# This file is (possibly, depending on python version) imported by 16d5a521cd236d4c95fda36257ed4b991e534e9b73kjellander@google.com# gyp_libyuv when GYP_PARALLEL=1 and it creates sub-processes 174a1836050df3cd554f68708e0097769386e74f40fbarchard@google.com# through the multiprocessing library. 184a1836050df3cd554f68708e0097769386e74f40fbarchard@google.com 194a1836050df3cd554f68708e0097769386e74f40fbarchard@google.com# Importing in Python 2.6 (fixed in 2.7) on Windows doesn't search for 204a1836050df3cd554f68708e0097769386e74f40fbarchard@google.com# imports that don't end in .py (and aren't directories with an 21d5a521cd236d4c95fda36257ed4b991e534e9b73kjellander@google.com# __init__.py). This wrapper makes "import gyp_libyuv" work with 22d5a521cd236d4c95fda36257ed4b991e534e9b73kjellander@google.com# those old versions and makes it possible to execute gyp_libyuv.py 234a1836050df3cd554f68708e0097769386e74f40fbarchard@google.com# directly on Windows where the extension is useful. 244a1836050df3cd554f68708e0097769386e74f40fbarchard@google.com 254a1836050df3cd554f68708e0097769386e74f40fbarchard@google.comimport os 264a1836050df3cd554f68708e0097769386e74f40fbarchard@google.com 274a1836050df3cd554f68708e0097769386e74f40fbarchard@google.compath = os.path.abspath(os.path.split(__file__)[0]) 284a1836050df3cd554f68708e0097769386e74f40fbarchard@google.comexecfile(os.path.join(path, 'gyp_libyuv')) 29