File tree Expand file tree Collapse file tree 1 file changed +3
-13
lines changed Expand file tree Collapse file tree 1 file changed +3
-13
lines changed Original file line number Diff line number Diff line change 1+ import codecs
12import os
23import subprocess
34import sys
45
56import common_compiler_flags
67from SCons .Variables import BoolVariable
78
8- if sys .version_info < (3 ,):
9-
10- def decode_utf8 (x ):
11- return x
12-
13- else :
14- import codecs
15-
16- def decode_utf8 (x ):
17- return codecs .utf_8_decode (x )[0 ]
18-
199
2010def has_ios_osxcross ():
2111 return "OSXCROSS_IOS" in os .environ
@@ -53,9 +43,9 @@ def generate(env):
5343 if sys .platform == "darwin" :
5444 if env ["IOS_SDK_PATH" ] == "" :
5545 try :
56- env ["IOS_SDK_PATH" ] = decode_utf8 (
46+ env ["IOS_SDK_PATH" ] = codecs . utf_8_decode (
5747 subprocess .check_output (["xcrun" , "--sdk" , sdk_name , "--show-sdk-path" ]).strip ()
58- )
48+ )[ 0 ]
5949 except (subprocess .CalledProcessError , OSError ):
6050 raise ValueError (
6151 "Failed to find SDK path while running xcrun --sdk {} --show-sdk-path." .format (sdk_name )
You can’t perform that action at this time.
0 commit comments