We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent abc4ecd commit 96bdc21Copy full SHA for 96bdc21
1 file changed
docs/source/conf.py
@@ -8,6 +8,13 @@
8
9
import ctypes
10
11
+# Monkey-patch PROT_READ into mmap if missing (Windows), so that we can
12
+# import mss.linux.xshmgetimage while building the documentation.
13
+import mmap
14
+
15
+if not hasattr(mmap, "PROT_READ"):
16
+ mmap.PROT_READ = 1 # type:ignore[attr-defined]
17
18
import mss
19
20
# -- General configuration ------------------------------------------------
@@ -44,7 +51,6 @@
44
51
ctypes.WINFUNCTYPE = ctypes.CFUNCTYPE # type:ignore[attr-defined]
45
52
ctypes.WinError = lambda _code=None, _descr=None: OSError() # type:ignore[attr-defined]
46
53
47
-
48
54
# -- Options for HTML output ----------------------------------------------
49
55
50
56
html_theme = "shibuya"
0 commit comments