diff --git a/isapi/install.py b/isapi/install.py index 0631b50ed..f28cf2ea0 100644 --- a/isapi/install.py +++ b/isapi/install.py @@ -39,9 +39,6 @@ _DEFAULT_ENABLE_DIR_BROWSING = False _DEFAULT_ENABLE_DEFAULT_DOC = False -_extensions = [ext for ext, _, _ in importlib.machinery.EXTENSION_SUFFIXES] -is_debug_build = "_d.pyd" in _extensions - this_dir = os.path.abspath(os.path.dirname(__file__)) @@ -504,9 +501,7 @@ def DeleteExtensionFileRecords(params, options): def CheckLoaderModule(dll_name): - suffix = "" - if is_debug_build: - suffix = "_d" + suffix = "_d" if "_d.pyd" in importlib.machinery.EXTENSION_SUFFIXES else "" template = os.path.join(this_dir, "PyISAPI_loader" + suffix + ".dll") if not os.path.isfile(template): raise ConfigurationError(f"Template loader '{template}' does not exist") diff --git a/win32/Lib/win32serviceutil.py b/win32/Lib/win32serviceutil.py index 19b425b06..16de6814c 100644 --- a/win32/Lib/win32serviceutil.py +++ b/win32/Lib/win32serviceutil.py @@ -6,7 +6,7 @@ # when things go wrong - eg, not enough permissions to hit the # registry etc. -import importlib +import importlib.machinery import os import sys import warnings