Fix platform usage.

This commit is contained in:
Bastian Kleineidam 2011-04-26 16:05:34 +02:00
parent 628bd801a2
commit 1ee66e4d60

View file

@ -443,8 +443,7 @@ if os.name == 'posix':
'doc/examples/check_for_x_errors.sh',
'doc/examples/check_urls.sh']))
elif os.name == 'nt':
# test for 64bit platforms relies on dist.bat setting PLATNAME accordingly
platform = os.environ.get("PLATNAME", "")
platform = util.get_platform()
if platform == "win-amd64":
# the Visual C++ runtime files are installed in the x86 directory
progvar = "%ProgramFiles(x86)%"
@ -453,7 +452,7 @@ elif os.name == 'nt':
progvar = "%ProgramFiles%"
architecture = "x86"
else:
raise ValueError("Unsupported %%PLATNAME%% variable value %r" % platform)
raise ValueError("Unsupported platform %r" % platform)
attrs = (os.path.expandvars(progvar), architecture)
crtdir = r'%s\Microsoft Visual Studio 9.0\VC\redist\%s\Microsoft.VC90.CRT' % attrs
data_files.append(('Microsoft.VC90.CRT', glob.glob(r'%s\*.*' % crtdir)))