Use find() method on string to run on both Python 2 and 3
This commit is contained in:
@@ -1,7 +1,6 @@
|
|||||||
#!/usr/bin/python
|
#!/usr/bin/python
|
||||||
|
|
||||||
import sys
|
import sys
|
||||||
import string
|
|
||||||
import re
|
import re
|
||||||
import subprocess
|
import subprocess
|
||||||
import platform
|
import platform
|
||||||
@@ -22,7 +21,7 @@ target = re.sub("\.c$", "", target)
|
|||||||
target = re.sub("-", "_", target)
|
target = re.sub("-", "_", target)
|
||||||
|
|
||||||
llvm_as="llvm-as"
|
llvm_as="llvm-as"
|
||||||
if platform.system() == 'Windows' or string.find(platform.system(), "CYGWIN_NT") != -1:
|
if platform.system() == 'Windows' or platform.system().find("CYGWIN_NT") != -1:
|
||||||
llvm_as = os.getenv("LLVM_INSTALL_DIR").replace("\\", "/") + "/bin/" + llvm_as
|
llvm_as = os.getenv("LLVM_INSTALL_DIR").replace("\\", "/") + "/bin/" + llvm_as
|
||||||
|
|
||||||
try:
|
try:
|
||||||
|
|||||||
Reference in New Issue
Block a user