Readthedocs使用过时的cod版本构建

2024-04-18 02:46:38 发布

您现在位置:Python中文网/ 问答频道 /正文

在“读取文档”中运行autodoc时,失败,我的项目出现以下错误:

Compiling sources ...error: [Errno 2] No such file or directory: 'gfortran'

我了解到gfortran在RTDF中不可用,所以我想尝试避免在运行Sphinx时导致错误的命令—类似于

if not 'sphinx' in sys.modules

this question所示。你知道吗

但是,当我想在RTFD上构建文档时,仍然会出现错误。我甚至对包含命令的整行进行了注释,但没有成功。显然,RTFD不使用存储库分支中的当前代码,因为它仍然从不再在代码中的命令中抛出错误。我也试过擦版本,但没用。你知道吗

我真的不知道发生了什么。RTFD build命令是

python3.5 -mvirtualenv --system-site-packages --no-download /home/docs/checkouts/readthedocs.org/user_builds/smuthi/envs/doc

python /home/docs/checkouts/readthedocs.org/user_builds/smuthi/envs/doc/bin/pip install --use-wheel --upgrade --cache-dir /home/docs/checkouts/readthedocs.org/user_builds/smuthi/.cache/pip -I Pygments==2.2.0 setuptools==37.0.0 docutils==0.13.1 mock==1.0.1 pillow==2.6.1 alabaster>=0.7,<0.8,!=0.7.5 commonmark==0.5.4 recommonmark==0.4.0 sphinx==1.6.5 sphinx-rtd-theme<0.3 readthedocs-sphinx-ext<0.6

install --exists-action=w --cache-dir /home/docs/checkouts/readthedocs.org/user_builds/smuthi/.cache/pip -rdocs/requirements.txt

我不知道这是什么意思,但它包含--use-wheelcache之类的东西。我的代码的早期版本确实在PyPi上构建了一个发行版,但当前版本没有

这可能是原因吗,即RTFD是从PyPi安装的,而不是从GitLab存储库安装的,并且它使用旧的轮子吗?你知道吗

有没有人经历过类似的事情? 有人知道出了什么问题吗?你知道吗


Tags: 代码org命令版本docscachehome错误
1条回答
网友
1楼 · 发布于 2024-04-18 02:46:38

问题是我把包本身放在docs/requirements.txt文件中,因此在构建时,包确实是从PyPi安装的。从需求中删除它之后,文档就正确地构建了。你知道吗

相关问题 更多 >