Source release 17.1.0

This commit is contained in:
John "Juce" Bruce
2022-07-07 17:14:31 -07:00
parent 8c17574083
commit 694cf6fb25
2233 changed files with 272026 additions and 223371 deletions

25
build_utils.py Normal file
View File

@@ -0,0 +1,25 @@
# Copyright 2022 Google LLC. All Rights Reserved. This file and proprietary
# source code may only be used and distributed under the Widevine License
# Agreement.
import os
import sys
CDM_TOP_PATH = os.path.abspath(os.path.dirname(__file__))
def LoadPlatform(name):
"""Loads and returns variables from the given platform."""
# Don't use "import" since we don't want the module cached since they all have
# the same base name. This ensures we can load different platforms.
path = os.path.join(CDM_TOP_PATH, 'platforms', name, 'environment.py')
if sys.version_info.major == 2:
# Need to support Python2 for Cobalt
import imp
env = imp.load_source('environment', path)
else:
import importlib.util
spec = importlib.util.spec_from_file_location('environment', path)
env = importlib.util.module_from_spec(spec)
spec.loader.exec_module(env)
return vars(env)