Skip to content Skip to sidebar Skip to footer

Autodoc On Readthedocs And Pyqt5

I'm writing a package that wraps PyQt5 functionality and trying to put the documentation on readthedocs. Since PyQt5 is an extension module I mock the module and its classes (manua

Solution 1:

Despite it "passing" the build, if you look carefully at your logs, you will see there are errors like ImportError: No module named 'qtypy' when it starts invoking sphinx.

When I've done this successfully in the past, I've always had a setup.py file at the top level of the repository for installing the package, which I believe is the only way that readthedocs can install the package.

I've then enabled, on readthedocs project admin -> advanced settings,

Install your project inside a virtualenv using setup.py install"

This ensures your module is available to be imported when sphinx runs, so that it can automatically generate the documentation (provided you have successfully mocked PyQt5).

Post a Comment for "Autodoc On Readthedocs And Pyqt5"