File: 003.fix-sphinx-conf-path.patch

package info (click to toggle)
python-proton-vpn-api-core 4.16.0-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 1,312 kB
  • sloc: python: 11,057; makefile: 9
file content (35 lines) | stat: -rw-r--r-- 1,241 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
Description: Fix Sphinx build path and add missing mock imports for proton.vpn
Author: Josenilson Ferreira da Silva <nilsonfsilva@hotmail.com>
Forwarded: not-needed
Last-Update: 2026-03-19
Index: python-proton-vpn-api-core/docs/conf.py
===================================================================
--- python-proton-vpn-api-core.orig/docs/conf.py
+++ python-proton-vpn-api-core/docs/conf.py
@@ -10,10 +10,14 @@
 # add these directories to sys.path here. If the directory is relative to the
 # documentation root, use os.path.abspath to make it absolute, like shown here.
 #
-# import os
-# import sys
-# sys.path.insert(0, os.path.abspath('.'))
+import os
+import sys
 
+import proton.vpn
+proton.vpn.__path__ = list(proton.vpn.__path__) + [
+    p + '/proton/vpn' for p in sys.path
+    if '.pybuild' in p and os.path.isdir(p + '/proton/vpn')
+]
 
 # -- Project information -----------------------------------------------------
 
@@ -53,3 +57,8 @@ html_static_path = ['_static']
 # Order documentation in the same order as source
 autodoc_member_order = 'bysource'
 #autodoc_mock_imports = ['proton']
+autodoc_mock_imports = [
+    'proton.vpn.core.orchestrators',
+    'proton.vpn.core.controllers',
+    'proton.vpn.core.views',
+]