In case it has been previously created.
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 = {