src_prepare-overlay/dev-python/sphinx-py3doc-enhanced-theme/files/Allow-missing-env-var.patch
Alfred Wingate a78d33721f
dev-python/sphinx-py3doc-enhanced-theme: add for pytest-benchmark
Package-Manager: Portage-3.0.18, Repoman-3.0.2
Signed-off-by: Alfred Wingate <parona@protonmail.com>
2021-05-22 12:35:04 +03:00

49 lines
1.5 KiB
Diff

From 56f88757c722d479fc8978f8a8be8469124970e2 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Ionel=20Cristian=20M=C4=83rie=C8=99?= <contact@ionelmc.ro>
Date: Tue, 4 May 2021 16:18:21 +0300
Subject: [PATCH] Allow missing env var. Closes #14.
---
tests/conf.py | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/tests/conf.py b/tests/conf.py
index 50baef3..2b251bb 100644
--- a/tests/conf.py
+++ b/tests/conf.py
@@ -3,6 +3,7 @@ from __future__ import unicode_literals
import os
+import sphinx_py3doc_enhanced_theme
extensions = [
'sphinx.ext.autodoc',
@@ -24,13 +25,13 @@ year = '2014-2015'
author = 'Ionel Cristian Mărieș'
copyright = '{0}, {1}'.format(year, author)
version = release = '2.4.0'
-import sphinx_py3doc_enhanced_theme
+
html_theme = "sphinx_py3doc_enhanced_theme"
html_theme_path = [sphinx_py3doc_enhanced_theme.get_html_theme_path()]
html_theme_options = {
'githuburl': 'https://github.com/ionelmc/sphinx-py3doc-enhanced-theme/',
}
-if os.environ['EXTRASTYLING'] == 'false':
+if os.environ.get('EXTRASTYLING', 'false') == 'false':
html_theme_options.update({
'bodyfont': '"Lucida Grande",Arial,sans-serif',
'headfont': '"Lucida Grande",Arial,sans-serif',
@@ -47,6 +48,6 @@ html_use_smartypants = True
html_last_updated_fmt = '%b %d, %Y'
html_split_index = True
html_sidebars = {
- '**': ['searchbox.html', 'globaltoc.html', 'sourcelink.html'],
+ '**': ['searchbox.html', 'globaltoc.html', 'sourcelink.html'],
}
html_short_title = '%s-%s' % (project, version)
--
2.26.3