From 3f36c59bdacc317a254bf4cba07e5f993d07ef56 Mon Sep 17 00:00:00 2001 From: Julien Palard Date: Mon, 26 Aug 2019 08:11:43 +0200 Subject: [PATCH] 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 --- Doc/conf.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Doc/conf.py b/Doc/conf.py index da8b9d7b2a65bce..ce2d47f5f8939ee 100644 --- a/Doc/conf.py +++ b/Doc/conf.py @@ -38,8 +38,10 @@ needs_sphinx = "1.6.6" # 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 = {