Commit 17379ffe authored by Jason R. Coombs's avatar Jason R. Coombs

Include 'arch' in the function signature rather than processing arguments by hand.

parent b165a8be
......@@ -47,12 +47,12 @@ def find_vcvarsall(version):
return unpatched['find_vcvarsall'](version)
def query_vcvarsall(version, *args, **kwargs):
def query_vcvarsall(version, arch='x86', *args, **kwargs):
message = ''
# Try to get environement from vcvarsall.bat (Classical way)
try:
return unpatched['query_vcvarsall'](version, *args, **kwargs)
return unpatched['query_vcvarsall'](version, arch, *args, **kwargs)
except distutils.errors.DistutilsPlatformError as exc:
# Error if Vcvarsall.bat is missing
message = exc.args[0]
......@@ -62,11 +62,7 @@ def query_vcvarsall(version, *args, **kwargs):
# If vcvarsall.bat fail, try to set environment directly
try:
if not args:
arch = 'x86'
else:
arch = args[0]
return setvcenv(version, kwargs.get('arch', arch))
return setvcenv(version, arch)
except distutils.errors.DistutilsPlatformError as exc:
# Error if MSVC++ directory not found or environment not set
message = exc.args[0]
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment