diff options
author | Miss Islington (bot) <31488909+miss-islington@users.noreply.github.com> | 2019-08-26 06:19:45 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-08-26 06:19:45 (GMT) |
commit | 352a1239ff4af51ea7468646ce964bafa9bc380d (patch) | |
tree | 101920823648bcf4a6ec18284f6a791148a2ee8c /Doc/conf.py | |
parent | 6ca030765db49525f16b8fabff4153238148b58d (diff) | |
download | cpython-352a1239ff4af51ea7468646ce964bafa9bc380d.zip cpython-352a1239ff4af51ea7468646ce964bafa9bc380d.tar.gz cpython-352a1239ff4af51ea7468646ce964bafa9bc380d.tar.bz2 |
Doc: Keep the venv/* exclude pattern. (GH-15229)
In case it has been previously created.
(cherry picked from commit 73e054970193fc421c533564a4189be522f9c331)
Co-authored-by: Julien Palard <julien@palard.fr>
Diffstat (limited to 'Doc/conf.py')
-rw-r--r-- | Doc/conf.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/Doc/conf.py b/Doc/conf.py index e85ea5b..abaa760 100644 --- a/Doc/conf.py +++ b/Doc/conf.py @@ -48,8 +48,10 @@ highlight_language = 'python3' needs_sphinx = '1.8' # Ignore any .rst files in the venv/ directory. -venvdir = os.getenv('VENVDIR', 'venv') -exclude_patterns = [venvdir+'/*', 'README.rst'] +exclude_patterns = ['venv/*', 'README.rst'] +venvdir = os.getenv('VENVDIR') +if venvdir is not None: + exclude_patterns.append(venvdir + '/*') # Disable Docutils smartquotes for several translations smartquotes_excludes = { |