From 57ca3b1cf0453b8b1fb328424e9f95e12444145e Mon Sep 17 00:00:00 2001 From: Dmitri Bogomolov <4glitch@gmail.com> Date: Sat, 20 Nov 2021 19:07:33 +0200 Subject: [PATCH 1/4] Update autodoc_mock_imports and apidoc_excluded_paths in docs/conf.py --- docs/conf.py | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/docs/conf.py b/docs/conf.py index 3464e056..e3eef6b3 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -201,8 +201,9 @@ epub_exclude_files = ['search.html'] autodoc_mock_imports = [ 'debug', 'pybitmessage.bitmessagekivy', - 'pybitmessage.bitmessageqt.addressvalidator', + 'pybitmessage.bitmessageqt.foldertree', 'pybitmessage.helper_startup', + 'pybitmessage.mock', 'pybitmessage.network.httpd', 'pybitmessage.network.https', 'ctypes', @@ -216,9 +217,10 @@ autodoc_mock_imports = [ 'pycanberra', 'pyopencl', 'PyQt4', - 'pyxdg', + 'PyQt5', 'qrcode', 'stem', + 'xdg', ] autodoc_member_order = 'bysource' @@ -227,10 +229,11 @@ apidoc_module_dir = '../pybitmessage' apidoc_output_dir = 'autodoc' apidoc_excluded_paths = [ 'bitmessagekivy', 'build_osx.py', - 'bitmessageqt/addressvalidator.py', 'bitmessageqt/migrationwizard.py', - 'bitmessageqt/newaddresswizard.py', 'helper_startup.py', - 'kivymd', 'main.py', 'navigationdrawer', 'network/http*', - 'pybitmessage', 'tests', 'version.py' + 'bitmessageqt/addressvalidator.py', 'bitmessageqt/foldertree.py', + 'bitmessageqt/migrationwizard.py', 'bitmessageqt/newaddresswizard.py', + 'helper_startup.py', + 'kivymd', 'mock', 'main.py', 'navigationdrawer', 'network/http*', + 'src', 'tests', 'version.py' ] apidoc_module_first = True apidoc_separate_modules = True -- 2.45.1 From 44144f3023a1330a81c2d5af8f61619e3ed47d44 Mon Sep 17 00:00:00 2001 From: Dmitri Bogomolov <4glitch@gmail.com> Date: Sat, 20 Nov 2021 22:39:48 +0200 Subject: [PATCH 2/4] Adjust docs dependencies: - leave sphinx and sphinx_rtd_theme in the extra and move the rest to docs/requirements.txt, which is used by RTD - docutils-0.18 caused a build failure --- docs/requirements.txt | 1 + setup.py | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/docs/requirements.txt b/docs/requirements.txt index 55219ec5..a62bf415 100644 --- a/docs/requirements.txt +++ b/docs/requirements.txt @@ -1,2 +1,3 @@ m2r sphinxcontrib-apidoc +docutils<=0.17.1 diff --git a/setup.py b/setup.py index 7b4821d7..f43f3d58 100644 --- a/setup.py +++ b/setup.py @@ -13,7 +13,7 @@ from src.version import softwareVersion EXTRAS_REQUIRE = { - 'docs': ['sphinx', 'sphinxcontrib-apidoc', 'm2r'], + 'docs': ['sphinx', 'sphinx_rtd_theme'], 'gir': ['pygobject'], 'json': ['jsonrpclib'], 'notify2': ['notify2'], -- 2.45.1 From ed6ca870926963f1a2866d77188d41d3083e0f5a Mon Sep 17 00:00:00 2001 From: Dmitri Bogomolov <4glitch@gmail.com> Date: Sun, 21 Nov 2021 19:03:29 +0200 Subject: [PATCH 3/4] Add a tox env for building docs --- tox.ini | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/tox.ini b/tox.ini index 211afd47..5d16c48b 100644 --- a/tox.ini +++ b/tox.ini @@ -12,6 +12,12 @@ commands = coverage run -a src/bitmessagemain.py -t coverage run -a -m tests +[testenv:py27-doc] +deps = + .[docs] + -r docs/requirements.txt +commands = python setup.py build_sphinx + [testenv:reset] commands = coverage erase -- 2.45.1 From 6fa407aefed64ee31745349468b364d073f5a850 Mon Sep 17 00:00:00 2001 From: Dmitri Bogomolov <4glitch@gmail.com> Date: Sun, 21 Nov 2021 20:00:14 +0200 Subject: [PATCH 4/4] Turn off system packages in rtfd config --- .readthedocs.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.readthedocs.yml b/.readthedocs.yml index 474ae9ab..2c7b9839 100644 --- a/.readthedocs.yml +++ b/.readthedocs.yml @@ -6,4 +6,4 @@ python: - requirements: docs/requirements.txt - method: setuptools path: . - system_packages: true + system_packages: false -- 2.45.1