File tree Expand file tree Collapse file tree 3 files changed +28
-0
lines changed Expand file tree Collapse file tree 3 files changed +28
-0
lines changed Original file line number Diff line number Diff line change 3333- add support for failing on missing submodules
3434- fix #279 : expand errors when scm can be found upwards and relative_to wasnt used
3535- fix #577 : introduce explicit scmversion node and short node
36+ - fix #1100 : add workaround for readthedocs worktress to the docs
3637
3738## v8.3.1
3839
Original file line number Diff line number Diff line change 1+ # Integrations
2+
3+ ## ReadTheDocs
4+
5+ ### Avoid having a dirty Git index
6+
7+ When building documentation on ReadTheDocs, file changes during the build process can cause setuptools-scm to detect a "dirty" working directory.
8+
9+ To avoid this issue, ReadTheDocs recommends using build customization to clean the Git state after checkout:
10+
11+ ``` yaml title=".readthedocs.yaml"
12+ version : 2
13+ build :
14+ os : " ubuntu-22.04"
15+ tools :
16+ python : " 3.10"
17+ jobs :
18+ post_checkout :
19+ # Avoid setuptools-scm dirty Git index issues
20+ - git reset --hard HEAD
21+ - git clean -fdx
22+ ` ` `
23+
24+ This ensures a clean Git working directory before setuptools-scm detects the version, preventing unwanted local version components.
25+
26+ Reference: [ReadTheDocs Build Customization - Avoid having a dirty Git index](https://docs.readthedocs.com/platform/stable/build-customization.html#avoid-having-a-dirty-git-index)
Original file line number Diff line number Diff line change 55 - usage.md
66 - customizing.md
77 - config.md
8+ - integrations.md
89 - extending.md
910 - overrides.md
1011 - changelog.md
You can’t perform that action at this time.
0 commit comments