mirror of
https://github.com/python-pillow/Pillow.git
synced 2025-01-27 01:34:24 +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():
|
def find_sdk71a():
|
||||||
try:
|
try:
|
||||||
|
print("trace: opening sdk key")
|
||||||
key = winreg.OpenKeyEx(
|
key = winreg.OpenKeyEx(
|
||||||
winreg.HKEY_LOCAL_MACHINE,
|
winreg.HKEY_LOCAL_MACHINE,
|
||||||
r"SOFTWARE\Microsoft\Microsoft SDKs\Windows\v7.1A",
|
r"SOFTWARE\Microsoft\Microsoft SDKs\Windows\v7.1A",
|
||||||
access=winreg.KEY_READ | winreg.KEY_WOW64_32KEY,
|
access=winreg.KEY_READ | winreg.KEY_WOW64_32KEY,
|
||||||
)
|
)
|
||||||
|
print("trace: opened sdk key")
|
||||||
except OSError:
|
except OSError:
|
||||||
return None
|
return None
|
||||||
|
print("trace: enumerating key")
|
||||||
with key:
|
with key:
|
||||||
for i in count():
|
for i in count():
|
||||||
try:
|
try:
|
||||||
v_name, v_value, v_type = winreg.EnumValue(key, i)
|
v_name, v_value, v_type = winreg.EnumValue(key, i)
|
||||||
|
print("trace: entry: {} {} = {}".format(v_type, v_name, v_value))
|
||||||
except OSError:
|
except OSError:
|
||||||
return None
|
return None
|
||||||
if v_name == "InstallationFolder" and v_type == winreg.REG_SZ:
|
if v_name == "InstallationFolder" and v_type == winreg.REG_SZ:
|
||||||
sdk_dir = v_value
|
sdk_dir = v_value
|
||||||
|
print("trace: found dir: {}".format(sdk_dir))
|
||||||
break
|
break
|
||||||
else:
|
else:
|
||||||
return None
|
return None
|
||||||
|
|
||||||
|
print("trace: closed key")
|
||||||
|
|
||||||
if not os.path.isdir(sdk_dir):
|
if not os.path.isdir(sdk_dir):
|
||||||
return None
|
return None
|
||||||
|
|
||||||
|
print("trace: creating dict")
|
||||||
|
|
||||||
sdk = {
|
sdk = {
|
||||||
"header": [
|
"header": [
|
||||||
# for win32.mak
|
# for win32.mak
|
||||||
|
|
Loading…
Reference in New Issue
Block a user