mirror of
https://github.com/python-pillow/Pillow.git
synced 2025-01-26 09:14:27 +03:00
add trace statements
This commit is contained in:
parent
b0885a5ceb
commit
b7120d56f1
|
@ -231,28 +231,37 @@ def find_vs2017(config):
|
|||
|
||||
def find_sdk71a():
|
||||
try:
|
||||
print("trace: opening sdk key")
|
||||
key = winreg.OpenKeyEx(
|
||||
winreg.HKEY_LOCAL_MACHINE,
|
||||
r"SOFTWARE\Microsoft\Microsoft SDKs\Windows\v7.1A",
|
||||
access=winreg.KEY_READ | winreg.KEY_WOW64_32KEY,
|
||||
)
|
||||
print("trace: opened sdk key")
|
||||
except OSError:
|
||||
return None
|
||||
print("trace: enumerating key")
|
||||
with key:
|
||||
for i in count():
|
||||
try:
|
||||
v_name, v_value, v_type = winreg.EnumValue(key, i)
|
||||
print("trace: entry: {} {} = {}".format(v_type, v_name, v_value))
|
||||
except OSError:
|
||||
return None
|
||||
if v_name == "InstallationFolder" and v_type == winreg.REG_SZ:
|
||||
sdk_dir = v_value
|
||||
print("trace: found dir: {}".format(sdk_dir))
|
||||
break
|
||||
else:
|
||||
return None
|
||||
|
||||
print("trace: closed key")
|
||||
|
||||
if not os.path.isdir(sdk_dir):
|
||||
return None
|
||||
|
||||
print("trace: creating dict")
|
||||
|
||||
sdk = {
|
||||
"header": [
|
||||
# for win32.mak
|
||||
|
|
Loading…
Reference in New Issue
Block a user