diff options
author | Campbell Barton <ideasman42@gmail.com> | 2013-06-24 09:55:05 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2013-06-24 09:55:05 +0400 |
commit | a5b78bb6bdebe798865e8d6bcb958708d49c73b3 (patch) | |
tree | aa6a417ac7651ef40d6f7173b3c6b01a50dc746a /build_files/scons | |
parent | 86bebb338013fd9ac4e39c3f3a8665b1d3b0ed53 (diff) |
replace use of 'a.find(b) != -1' --> 'b in a'
Diffstat (limited to 'build_files/scons')
-rw-r--r-- | build_files/scons/config/win32-vc-config.py | 9 | ||||
-rw-r--r-- | build_files/scons/config/win64-vc-config.py | 9 | ||||
-rw-r--r-- | build_files/scons/tools/Blender.py | 2 | ||||
-rw-r--r-- | build_files/scons/tools/btools.py | 8 |
4 files changed, 13 insertions, 15 deletions
diff --git a/build_files/scons/config/win32-vc-config.py b/build_files/scons/config/win32-vc-config.py index 12ca16d480a..f1597a66538 100644 --- a/build_files/scons/config/win32-vc-config.py +++ b/build_files/scons/config/win32-vc-config.py @@ -3,13 +3,12 @@ import subprocess CL_OUT = subprocess.Popen(["cl.exe"],stdout=subprocess.PIPE,stderr=subprocess.PIPE) CL_STDOUT, CL_STDERR = CL_OUT.communicate() -if CL_STDERR.find("17.00.") == -1: - VC_VERSION = '9.0' - LCGDIR = '#../lib/windows' - -else: +if "17.00." in CL_STDERR: VC_VERSION = '11.0' LCGDIR = '#../lib/windows_vc11' +else: + VC_VERSION = '9.0' + LCGDIR = '#../lib/windows' LIBDIR = '${LCGDIR}' diff --git a/build_files/scons/config/win64-vc-config.py b/build_files/scons/config/win64-vc-config.py index ab1c2a87d93..a13f417c36c 100644 --- a/build_files/scons/config/win64-vc-config.py +++ b/build_files/scons/config/win64-vc-config.py @@ -3,13 +3,12 @@ import subprocess CL_OUT = subprocess.Popen(["cl.exe"],stdout=subprocess.PIPE,stderr=subprocess.PIPE) CL_STDOUT, CL_STDERR = CL_OUT.communicate() -if CL_STDERR.find("17.00.") == -1: - VC_VERSION = '9.0' - LCGDIR = '#../lib/win64' - -else: +if "17.00." in CL_STDERR: VC_VERSION = '11.0' LCGDIR = '#../lib/win64_vc11' +else: + VC_VERSION = '9.0' + LCGDIR = '#../lib/win64' LIBDIR = '${LCGDIR}' diff --git a/build_files/scons/tools/Blender.py b/build_files/scons/tools/Blender.py index c6cb88faebc..24bdd32ed26 100644 --- a/build_files/scons/tools/Blender.py +++ b/build_files/scons/tools/Blender.py @@ -847,7 +847,7 @@ class BlenderEnvironment(SConsEnvironment): def list_substring(quickie, libname): for q in quickie: - if libname.find(q) != -1: + if q in libname: return True return False diff --git a/build_files/scons/tools/btools.py b/build_files/scons/tools/btools.py index 90674113f47..53dd99a7971 100644 --- a/build_files/scons/tools/btools.py +++ b/build_files/scons/tools/btools.py @@ -674,10 +674,10 @@ def buildslave(target=None, source=None, env=None): if platform == 'linux': import platform - if env['BF_INSTALLDIR'].find('glibc27') != -1: - glibc="glibc27" - elif env['BF_INSTALLDIR'].find('glibc211') != -1: - glibc="glibc211" + if "glibc27" in env['BF_INSTALLDIR']: + glibc = "glibc27" + elif "glibc211" in env['BF_INSTALLDIR']: + glibc = "glibc211" bitness = platform.architecture()[0] if bitness == '64bit': |