Skip to content

Sphinx builds don't copy .txt files into its _sources build directory for .rst stub files generated by sphinx-apidoc #81

Closed

Description

@stevepiercy

Sphinx is supposed to write .txt files into _sources in its build directory for any build. It does that for all .rst files except for those that are generated by sphinx-apidoc.

Strangely, icalendar does not exhibit this behavior, although the setup is similar, except that in icalendar we use sphinx.ext.apidoc instead. Here in calendaring-jmap, I needed to customize the templates to insert the SPDX headers, and sphinx.ext.apidoc doesn't support the --templatesdir option.

I discovered this while trying out the Sphinx extension sphinx-llms-txt, which reported that these files did not exist.

Activity

  1. added
    bugSomething isn't working
    documentationImprovements or additions to documentation
    help wantedExtra attention is needed
    on Nov 1, 2026
  2. SashankBhamidi commented on Nov 2, 2026

    @SashankBhamidi
    Member

    Couldn't reproduce this on a clean rebuild, locally or on RTD. All 16 .txt files are present under _sources/reference/api/. Did something change on your end since you filed this, or is it worth digging into further?

  3. stevepiercy commented on Nov 3, 2026

    @stevepiercy
    MemberAuthor

    Now I can't reproduce it. I have no idea what might have changed. I even checked out the commit prior to this report. The only thing I think could have been at fault is that I didn't refresh the file tree view in PyCharm (this is a common annoyance) and I didn't double-check with an ls -al _build/html/_sources/reference/api.

    I'll close this and open a new issue to add the Sphinx extension sphinx-llms-txt and do a little clean up of conf.py comments.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingdocumentationImprovements or additions to documentationgood first issueGood for newcomershelp wantedExtra attention is needed

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions