Skip to content

Commit f830dba

Browse files
committed
setup.py: also mock ctypes.WinDLL when building documentation.
We mock ctypes.CDLL when building documentation so that the library does not need to be installed on the system. But in some cases, WinDLL is used instead. Mock it for the same reasons.
1 parent fc0c9ec commit f830dba

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

setup.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,9 @@ def run(self):
113113
])
114114

115115
with unittest.mock.patch('ctypes.CDLL', new=cdll_diversion):
116-
super().run()
116+
with unittest.mock.patch('ctypes.WinDLL', new=cdll_diversion,
117+
create=True):
118+
super().run()
117119

118120
else:
119121
class BuildDoc(distutils.cmd.Command):

0 commit comments

Comments
 (0)