Skip to content

Commit 65dedd5

Browse files
authored
Merge 6ee3121 into 157ac49
2 parents 157ac49 + 6ee3121 commit 65dedd5

1 file changed

Lines changed: 11 additions & 0 deletions

File tree

devDocs/conf.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,17 @@
1212
sys.path.insert(0, os.path.abspath('../source'))
1313
import sourceEnv # noqa: F401, E402
1414

15+
16+
# Apply several monkey patches to comtypes.
17+
# Add our `comInterfaces` to the `comtypes.gen` seach path to replicate the behavior at runtime
18+
# without this patch many modules aren't importable, since they depend on `comInterfaces` being present.
19+
# Also disable module being never than typelib error, seen when
20+
# virtual environment has been created under different version of Windows than the one
21+
# used for developer documentation build. This also matches the behavior at runtime.
22+
import monkeyPatches.comtypesMonkeyPatches # noqa: E402
23+
monkeyPatches.comtypesMonkeyPatches.replace_check_version()
24+
monkeyPatches.comtypesMonkeyPatches.appendComInterfacesToGenSearchPath()
25+
1526
# Initialize languageHandler so that sphinx is able to deal with translatable strings.
1627
import languageHandler # noqa: E402
1728
languageHandler.setLanguage("en")

0 commit comments

Comments
 (0)