libkeepass / pykeepass

Python library to interact with keepass databases (supports KDBX3 and KDBX4)
https://pypi.org/project/pykeepass/
GNU General Public License v3.0
410 stars 94 forks source link

4.0.1: sphinx warnings #287

Open kloczek opened 2 years ago

kloczek commented 2 years ago

Looks like sphinx shows some warnings:

+ /usr/bin/python3 setup.py build_sphinx -b man --build-dir build/sphinx
running build_sphinx
Running Sphinx v4.3.1
making output directory... done
WARNING: html_static_path entry '_static' does not exist
building [mo]: targets for 0 po files that are out of date
building [man]: all manpages
updating environment: [new config] 8 added, 0 changed, 0 removed
reading sources... [100%] pykeepass
WARNING: autodoc: failed to import module 'attachment' from module 'pykeepass'; the following exception was raised:
No module named 'construct'
WARNING: autodoc: failed to import module 'baseelement' from module 'pykeepass'; the following exception was raised:
No module named 'construct'
WARNING: autodoc: failed to import module 'entry' from module 'pykeepass'; the following exception was raised:
No module named 'construct'
WARNING: autodoc: failed to import module 'exceptions' from module 'pykeepass'; the following exception was raised:
No module named 'construct'
WARNING: autodoc: failed to import module 'group' from module 'pykeepass'; the following exception was raised:
No module named 'construct'
WARNING: autodoc: failed to import module 'icons' from module 'pykeepass'; the following exception was raised:
No module named 'construct'
WARNING: autodoc: failed to import module 'pykeepass' from module 'pykeepass'; the following exception was raised:
No module named 'construct'
looking for now-outdated files... none found
pickling environment... done
checking consistency... done
writing... python-pykeepass.3 { pykeepass group entry attachment icons exceptions baseelement } done
build succeeded, 8 warnings.
kloczek commented 2 years ago

OK I found what is going on. Looks like it is necessary small patch

--- a/doc/source/conf.py~       2022-05-03 17:40:06.149851923 +0000
+++ b/doc/source/conf.py        2022-05-03 17:40:44.016865537 +0000
@@ -10,9 +10,9 @@
 # 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
+sys.path.insert(0, os.path.abspath('../..'))

 # -- Project information -----------------------------------------------------

This patch is doing exactly what is mentioned in linex above modyfication. Than .. with that patch there is new set of warnimgs about missig refferencies

+ /usr/bin/sphinx-build -n -T -b man doc/source build/sphinx/man
Running Sphinx v4.5.0
making output directory... done
WARNING: html_static_path entry '_static' does not exist
building [mo]: targets for 0 po files that are out of date
building [man]: all manpages
updating environment: [new config] 8 added, 0 changed, 0 removed
reading sources... [100%] pykeepass
looking for now-outdated files... none found
pickling environment... done
checking consistency... done
writing... python-pykeepass.3 { pykeepass group entry attachment icons exceptions baseelement } /home/tkloczko/rpmbuild/BUILD/pykeepass-4.0.1/pykeepass/pykeepass.py:docstring of pykeepass.pykeepass.PyKeePass.empty_group:6: WARNING: py:obj reference target not found: Group
/home/tkloczko/rpmbuild/BUILD/pykeepass-4.0.1/pykeepass/pykeepass.py:docstring of pykeepass.pykeepass.PyKeePass.entries:1: WARNING: py:obj reference target not found: Entry
/home/tkloczko/rpmbuild/BUILD/pykeepass-4.0.1/pykeepass/pykeepass.py:docstring of pykeepass.pykeepass.PyKeePass.groups:1: WARNING: py:obj reference target not found: Group
/home/tkloczko/rpmbuild/BUILD/pykeepass-4.0.1/pykeepass/pykeepass.py:docstring of pykeepass.pykeepass.PyKeePass.trash_entry:4: WARNING: py:obj reference target not found: Entry
/home/tkloczko/rpmbuild/BUILD/pykeepass-4.0.1/pykeepass/pykeepass.py:docstring of pykeepass.pykeepass.PyKeePass.trash_group:4: WARNING: py:obj reference target not found: Group
done
build succeeded, 6 warnings.