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 33
33
- add support for failing on missing submodules
34
34
- fix #279 : expand errors when scm can be found upwards and relative_to wasnt used
35
35
- fix #577 : introduce explicit scmversion node and short node
36
+ - fix #1100 : add workaround for readthedocs worktress to the docs
36
37
37
38
## v8.3.1
38
39
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 5
5
- usage.md
6
6
- customizing.md
7
7
- config.md
8
+ - integrations.md
8
9
- extending.md
9
10
- overrides.md
10
11
- changelog.md
You can’t perform that action at this time.
0 commit comments