[Python-checkins] Doc: Keep the venv/* exclude pattern. (GH-15229)

Miss Islington (bot) webhook-mailer at python.org
Mon Aug 26 02:19:50 EDT 2019


https://github.com/python/cpython/commit/352a1239ff4af51ea7468646ce964bafa9bc380d
commit: 352a1239ff4af51ea7468646ce964bafa9bc380d
branch: 3.8
author: Miss Islington (bot) <31488909+miss-islington at users.noreply.github.com>
committer: GitHub <noreply at github.com>
date: 2019-08-25T23:19:45-07:00
summary:

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 at palard.fr>

files:
M Doc/conf.py

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 @@
 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 = {



More information about the Python-checkins mailing list