Skip to content

Commit f0b9c5f

Browse files
Review
1 parent 0f91167 commit f0b9c5f

File tree

3 files changed

+14
-4
lines changed

3 files changed

+14
-4
lines changed

.github/workflows/reusable-idle-help-doc.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,9 @@ jobs:
2727
with:
2828
python-version: '3'
2929
- name: 'Regenerate Lib/idlelib/help.html'
30-
run: python ../Tools/build/generate_idle_help.py
30+
run: |
31+
mkdir -v html/ # trick make into skipping the dependency target
32+
make idlehelp
3133
working-directory: Doc
3234
- name: 'Check for changes'
3335
run: |

Tools/build/compute-changes.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -167,6 +167,8 @@ def process_changed_files(changed_files: Set[Path]) -> Outputs:
167167
has_platform_specific_change = False
168168
if file.name == "reusable-docs.yml":
169169
run_docs = True
170+
if file.name == "reusable-idle-help-doc.yml":
171+
run_idle_help_doc = True
170172
if file.name == "reusable-windows-msi.yml":
171173
run_windows_msi = True
172174
if file.name == "reusable-macos.yml":
@@ -204,7 +206,8 @@ def process_changed_files(changed_files: Set[Path]) -> Outputs:
204206
run_docs = True
205207

206208
# Check for changed IDLE docs
207-
if file == Path("Doc/library/idle.rst"):
209+
if file in (Path("Doc/library/idle.rst"),
210+
Path("Tools/build/generate_idle_help.py")):
208211
run_idle_help_doc = True
209212

210213
# Check for changed MSI installer-related files

Tools/build/generate_idle_help.py

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,14 @@
2020
version.
2121
"""
2222

23+
from os.path import abspath, dirname, join
24+
25+
2326
def copy_strip():
24-
src = 'build/html/library/idle.html'
25-
dst = '../Lib/idlelib/help.html'
27+
src = join(abspath(dirname(dirname(dirname(__file__)))),
28+
'Doc', 'build', 'html', 'library', 'idle.html')
29+
dst = join(abspath(dirname(dirname(dirname(__file__)))),
30+
'Lib', 'idlelib', 'help.html')
2631

2732
with open(src, encoding="utf-8") as inn, open(dst, 'w', encoding="utf-8") as out:
2833
copy = False

0 commit comments

Comments
 (0)