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',
+]
|