From: Julien Palard Date: Mon, 26 Aug 2019 06:11:43 +0000 (+0200) Subject: Doc: Keep the venv/* exclude pattern. (GH-15229) X-Git-Tag: v3.9.0a1~780 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=73e054970193fc421c533564a4189be522f9c331;p=thirdparty%2FPython%2Fcpython.git Doc: Keep the venv/* exclude pattern. (GH-15229) In case it has been previously created. --- diff --git a/Doc/conf.py b/Doc/conf.py index e85ea5b2d2ff..abaa760c98c1 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 = {