Sigh. With some debugging of the Sphinx code I found that exclude_patterns 
was already being set much further down in the conf.py file. Since this 
file is just loaded by Python I guess there's no way to really catch this 
case of user error and give a warning.

(Actually there is...have users call predefined functions that are part of 
Sphinx, e.g., SetExcludePatterns and/or AppendExcludePatterns, and have 
those functions do various sanity checks. )

At least this made me upgrade to 4.5.0. :-)

On Sunday, May 15, 2022 at 5:40:14 PM UTC-4 Carl Gay wrote:

> Hi, I'm trying to build docs for a set of libraries. I have a top-level 
> directory containing the Sphinx Makefile and conf.py generated by 
> sphinx-quickstart and then I have a "libraries" subdirectory in which I 
> have git cloned several libraries. So the structure is like this:
>
> ./conf.py
> ./Makefile
> ./libraries/
> ./libraries/lib1/documentation/source/index.rst
> ./libraries/lib1/documentation/source/other.rst
> ./libraries/lib2/documentation/source/index.rst
> ./index.rst   # includes the above index.rst files
>
> My problem is that the libraries may include git submodules that 
> themselves contain documentation, and Sphinx is automatically including 
> those .rst files. I get many warnings like these:
>
> /home/cgay/dylan/workspaces/doc2/libraries/http/submodules/concurrency/documentation/source/index.rst:48:
>  
> WARNING: Duplicate description of Dylan class 
> concurrency:concurrency:<executor>, other instance in 
> /home/cgay/dylan/workspaces/doc2/libraries/concurrency/documentation/source/index.rst
>
> I've tried using exclude_patterns = ['**/submodules'] and variations on 
> that idea, but I can't seem to make Sphinx ignore the submodules 
> directory.  This seems pretty much exactly what is being done in the 
> example in the Sphinx docs here to ignore **/.svn ... 
> https://www.sphinx-doc.org/en/master/usage/configuration.html?highlight=exclude_pattern#confval-exclude_patterns
>
> Any help appreciated. I'm using Sphinx 4.2.0.
>
> Thanks.
> -Carl
>

-- 
You received this message because you are subscribed to the Google Groups 
"sphinx-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sphinx-users/1b662dfa-e98a-4665-8cd5-79bdb4ede4fan%40googlegroups.com.

Reply via email to