summaryrefslogtreecommitdiffstats
path: root/Lib
diff options
context:
space:
mode:
authorFredrik Lundh <fredrik@pythonware.com>2004-11-24 22:31:11 (GMT)
committerFredrik Lundh <fredrik@pythonware.com>2004-11-24 22:31:11 (GMT)
commitcb328f393e9ca0278491a97fad48c225ad9c5484 (patch)
treede423eaa69b3ecadaf8f43b80a98a9c680e796bd /Lib
parentf8c6e6a16bf1ea199fdbda9a3d9e41bcdfbe41cd (diff)
downloadcpython-cb328f393e9ca0278491a97fad48c225ad9c5484.zip
cpython-cb328f393e9ca0278491a97fad48c225ad9c5484.tar.gz
cpython-cb328f393e9ca0278491a97fad48c225ad9c5484.tar.bz2
SF patch #1071739 (by Christos Georgiou)
This patch offers a better explanation in case the MS VC++ (free) toolkit is installed but the .NET Framework SDK is not.
Diffstat (limited to 'Lib')
-rw-r--r--Lib/distutils/msvccompiler.py13
1 files changed, 9 insertions, 4 deletions
diff --git a/Lib/distutils/msvccompiler.py b/Lib/distutils/msvccompiler.py
index dd9d892..ccb62a8 100644
--- a/Lib/distutils/msvccompiler.py
+++ b/Lib/distutils/msvccompiler.py
@@ -124,10 +124,15 @@ class MacroExpander:
self.set_macro("VSInstallDir", vsbase + r"\Setup\VS", "productdir")
net = r"Software\Microsoft\.NETFramework"
self.set_macro("FrameworkDir", net, "installroot")
- if version > 7.0:
- self.set_macro("FrameworkSDKDir", net, "sdkinstallrootv1.1")
- else:
- self.set_macro("FrameworkSDKDir", net, "sdkinstallroot")
+ try:
+ if version > 7.0:
+ self.set_macro("FrameworkSDKDir", net, "sdkinstallrootv1.1")
+ else:
+ self.set_macro("FrameworkSDKDir", net, "sdkinstallroot")
+ except KeyError, exc: #
+ raise DistutilsPlatformError, \
+ ("The .NET Framework SDK needs to be installed before "
+ "building extensions for Python.")
p = r"Software\Microsoft\NET Framework Setup\Product"
for base in HKEYS: