(self, version)
| 108 | break |
| 109 | |
| 110 | def load_macros(self, version): |
| 111 | vsbase = r"Software\Microsoft\VisualStudio\%0.1f" % version |
| 112 | self.set_macro("VCInstallDir", vsbase + r"\Setup\VC", "productdir") |
| 113 | self.set_macro("VSInstallDir", vsbase + r"\Setup\VS", "productdir") |
| 114 | net = r"Software\Microsoft\.NETFramework" |
| 115 | self.set_macro("FrameworkDir", net, "installroot") |
| 116 | try: |
| 117 | if version > 7.0: |
| 118 | self.set_macro("FrameworkSDKDir", net, "sdkinstallrootv1.1") |
| 119 | else: |
| 120 | self.set_macro("FrameworkSDKDir", net, "sdkinstallroot") |
| 121 | except KeyError as exc: # |
| 122 | raise DistutilsPlatformError( |
| 123 | """Python was built with Visual Studio 2003; |
| 124 | extensions must be built with a compiler than can generate compatible binaries. |
| 125 | Visual Studio 2003 was not found on this system. If you have Cygwin installed, |
| 126 | you can try compiling with MingW32, by passing "-c mingw32" to setup.py.""") |
| 127 | |
| 128 | p = r"Software\Microsoft\NET Framework Setup\Product" |
| 129 | for base in HKEYS: |
| 130 | try: |
| 131 | h = RegOpenKeyEx(base, p) |
| 132 | except RegError: |
| 133 | continue |
| 134 | key = RegEnumKey(h, 0) |
| 135 | d = read_values(base, r"%s\%s" % (p, key)) |
| 136 | self.macros["$(FrameworkVersion)"] = d["version"] |
| 137 | |
| 138 | def sub(self, s): |
| 139 | for k, v in self.macros.items(): |
no test coverage detected