File tree 1 file changed +3
-13
lines changed
1 file changed +3
-13
lines changed Original file line number Diff line number Diff line change
1
+ import codecs
1
2
import os
2
3
import subprocess
3
4
import sys
4
5
5
6
import common_compiler_flags
6
7
from SCons .Variables import BoolVariable
7
8
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
-
19
9
20
10
def has_ios_osxcross ():
21
11
return "OSXCROSS_IOS" in os .environ
@@ -53,9 +43,9 @@ def generate(env):
53
43
if sys .platform == "darwin" :
54
44
if env ["IOS_SDK_PATH" ] == "" :
55
45
try :
56
- env ["IOS_SDK_PATH" ] = decode_utf8 (
46
+ env ["IOS_SDK_PATH" ] = codecs . utf_8_decode (
57
47
subprocess .check_output (["xcrun" , "--sdk" , sdk_name , "--show-sdk-path" ]).strip ()
58
- )
48
+ )[ 0 ]
59
49
except (subprocess .CalledProcessError , OSError ):
60
50
raise ValueError (
61
51
"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