Skip to content

Commit

Permalink
Pin sphinxcontrib dependencies on ReadTheDocs
Browse files Browse the repository at this point in the history
  • Loading branch information
domdfcoding committed Jan 17, 2024
1 parent ae4915d commit 26abf86
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 1 deletion.
15 changes: 14 additions & 1 deletion repo_helper/files/docs.py
Original file line number Diff line number Diff line change
Expand Up @@ -216,6 +216,16 @@ def make_rtfd(repo_path: pathlib.Path, templates: Environment) -> List[str]:
else:
post_create_command = "pip install ."

pinned_sphinxcontrib_deps = [
"sphinxcontrib-applehelp==1.0.4",
"sphinxcontrib-devhelp==1.0.2",
"sphinxcontrib-htmlhelp==2.0.1",
"sphinxcontrib-jsmath==1.0.1",
"sphinxcontrib-qthelp==1.0.3",
"sphinxcontrib-serializinghtml==1.1.5",
]
post_install_command = "pip install " + ' '.join(pinned_sphinxcontrib_deps)

# Formats: Optionally build your docs in additional formats such as PDF and ePub
config = {
"version": 2,
Expand All @@ -228,7 +238,10 @@ def make_rtfd(repo_path: pathlib.Path, templates: Environment) -> List[str]:
"build": {
"os": "ubuntu-20.04",
"tools": {"python": "3.9"},
"jobs": {"post_create_environment": [post_create_command]}
"jobs": {
"post_create_environment": [post_create_command],
"post_install": [post_install_command],
}
}
}

Expand Down
3 changes: 3 additions & 0 deletions tests/test_files/test_docs_/test_make_rtfd_case_1.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,6 @@ build:
jobs:
post_create_environment:
- pip install .[all]
post_install:
- pip install sphinxcontrib-applehelp==1.0.4 sphinxcontrib-devhelp==1.0.2 sphinxcontrib-htmlhelp==2.0.1
sphinxcontrib-jsmath==1.0.1 sphinxcontrib-qthelp==1.0.3 sphinxcontrib-serializinghtml==1.1.5
3 changes: 3 additions & 0 deletions tests/test_files/test_docs_/test_make_rtfd_case_2.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,3 +20,6 @@ build:
jobs:
post_create_environment:
- pip install .[all]
post_install:
- pip install sphinxcontrib-applehelp==1.0.4 sphinxcontrib-devhelp==1.0.2 sphinxcontrib-htmlhelp==2.0.1
sphinxcontrib-jsmath==1.0.1 sphinxcontrib-qthelp==1.0.3 sphinxcontrib-serializinghtml==1.1.5

0 comments on commit 26abf86

Please sign in to comment.