diff options
author | Steve Dower <steve.dower@microsoft.com> | 2018-12-20 02:20:06 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-12-20 02:20:06 (GMT) |
commit | afe17a7bee1bcb39dc56f2949431204918568ac1 (patch) | |
tree | 4726690326b11a223eb00a653b959b274ab84e6b /Doc/tools/extensions/pyspecific.py | |
parent | b2f642ccd2f65d2f3bf77bbaa103dd2bc2733734 (diff) | |
download | cpython-afe17a7bee1bcb39dc56f2949431204918568ac1.zip cpython-afe17a7bee1bcb39dc56f2949431204918568ac1.tar.gz cpython-afe17a7bee1bcb39dc56f2949431204918568ac1.tar.bz2 |
bpo-35482: Fixes HTML escaping in CHM index and build location of NEWS file (GH-11224)
Diffstat (limited to 'Doc/tools/extensions/pyspecific.py')
-rw-r--r-- | Doc/tools/extensions/pyspecific.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/Doc/tools/extensions/pyspecific.py b/Doc/tools/extensions/pyspecific.py index 10e4a4d..6631743 100644 --- a/Doc/tools/extensions/pyspecific.py +++ b/Doc/tools/extensions/pyspecific.py @@ -11,7 +11,7 @@ import re import io -from os import path +from os import getenv, path from time import asctime from pprint import pformat from docutils.io import StringOutput @@ -292,7 +292,9 @@ class MiscNews(Directive): fname = self.arguments[0] source = self.state_machine.input_lines.source( self.lineno - self.state_machine.input_offset - 1) - source_dir = path.dirname(path.abspath(source)) + source_dir = getenv('PY_MISC_NEWS_DIR') + if not source_dir: + source_dir = path.dirname(path.abspath(source)) fpath = path.join(source_dir, fname) self.state.document.settings.record_dependencies.add(fpath) try: |