How to turn warnings into errors when building sphinx documentation with setuptools?

后端 未结 3 1529
佛祖请我去吃肉
佛祖请我去吃肉 2021-02-19 15:45

I am using setuptools to build my sphinx documentation of a python project (python setup.py build_sphinx).

As found on, e.g., this site, I have configured t

3条回答
  •  悲&欢浪女
    2021-02-19 16:36

    In recent versions of Sphinx, you do this by adding an additional option to the section in setup.cfg:

    [build_sphinx]
    all-files = 1
    source-dir = docs/source
    build-dir = docs/build
    warning-is-error = 1
    

    Support for this was added in Sphinx 1.5, thus, this will not work with older versions.

提交回复
热议问题