简体   繁体   English

为 Sphinx 文档 conf.py 文件配置源目录

[英]Configuring source dir for Sphinx documentation conf.py file

I got a package that i am about to upload to a local devpi server.我有一个 package,我即将上传到本地 devpi 服务器。 I got some issues with the package not being able to find the conf.py file for Sphinx which makes sense as it looks at the (package_name)/docs folder instead of (package_name)/docs/source which i use and also has all the RST files in it.我遇到了 package 的一些问题,无法找到 Sphinx 的 conf.py 文件,这很有意义,因为它查看的是(package_name)/docs文件夹,而不是我使用的(package_name)/docs/source RST文件在里面。 How do i in pyproject.toml configure Devpi to set sphinx source_dir to (package_name)/docs/source ?我如何在 pyproject.toml 中配置 Devpi 以将 sphinx source_dir 设置为(package_name)/docs/source

It could surely be resolved in some way using sys.path.append() and then changing the path of the config but I do wonder about the configuration of this and if it is supported.它肯定可以使用sys.path.append()以某种方式解决,然后更改配置的路径,但我确实想知道它的配置以及它是否受支持。

In devpi-client version 5.2.3 it should work.devpi-client版本 5.2.3 中它应该可以工作。
Because the change: "Use sphinx-build command instead of setup.py build_sphinx when building documentation."因为更改:“在构建文档时使用sphinx-build命令而不是setup.py build_sphinx 。” in version 6.0.0 the upload routine doesn't "recognize" your local dir structure.在版本 6.0.0 中,上传例程不会“识别”您的本地目录结构。
But I haven't find out yet how you can propagate arguments to the sphinx-build to specify the docs source dir.但我还没有找到如何将 arguments 传播到 sphinx-build 以指定文档源目录。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM