diff --git a/readthedocs/doc_builder/backends/sphinx.py b/readthedocs/doc_builder/backends/sphinx.py index 3cfe5766dfe..1d280b8a318 100644 --- a/readthedocs/doc_builder/backends/sphinx.py +++ b/readthedocs/doc_builder/backends/sphinx.py @@ -27,7 +27,7 @@ from readthedocs.projects.models import Feature from ..base import BaseBuilder, restoring_chdir -from ..constants import PDF_RE, SPHINX_STATIC_DIR, SPHINX_TEMPLATE_DIR +from ..constants import PDF_RE from ..environments import BuildCommand, DockerBuildCommand from ..exceptions import BuildEnvironmentError from ..signals import finalize_sphinx_context_data @@ -63,7 +63,6 @@ def _write_config(self, master_doc='index'): 'sphinx/conf.py.conf', { 'project': self.project, 'version': self.version, - 'template_dir': SPHINX_TEMPLATE_DIR, 'master_doc': master_doc, }) conf_file = os.path.join(docs_dir, 'conf.py') @@ -114,8 +113,6 @@ def get_config_params(self): 'project': self.project, 'version': self.version, 'settings': settings, - 'static_path': SPHINX_STATIC_DIR, - 'template_path': SPHINX_TEMPLATE_DIR, 'conf_py_path': conf_py_path, 'api_host': getattr( settings, diff --git a/readthedocs/doc_builder/constants.py b/readthedocs/doc_builder/constants.py index 14598ea00bf..1cd1a5b1348 100644 --- a/readthedocs/doc_builder/constants.py +++ b/readthedocs/doc_builder/constants.py @@ -12,19 +12,12 @@ log = logging.getLogger(__name__) -SPHINX_TEMPLATE_DIR = os.path.join( - settings.SITE_ROOT, - 'readthedocs', - 'templates', - 'sphinx', -) MKDOCS_TEMPLATE_DIR = os.path.join( settings.SITE_ROOT, 'readthedocs', 'templates', 'mkdocs', ) -SPHINX_STATIC_DIR = os.path.join(SPHINX_TEMPLATE_DIR, '_static') PDF_RE = re.compile('Output written on (.*?)') diff --git a/readthedocs/doc_builder/environments.py b/readthedocs/doc_builder/environments.py index d48fc73641f..b8980ec6971 100644 --- a/readthedocs/doc_builder/environments.py +++ b/readthedocs/doc_builder/environments.py @@ -43,7 +43,6 @@ DOCKER_TIMEOUT_EXIT_CODE, DOCKER_VERSION, MKDOCS_TEMPLATE_DIR, - SPHINX_TEMPLATE_DIR, ) from .exceptions import ( BuildEnvironmentCreationFailed, @@ -866,10 +865,6 @@ def get_container_host_config(self): ``client.create_container``. """ binds = { - SPHINX_TEMPLATE_DIR: { - 'bind': SPHINX_TEMPLATE_DIR, - 'mode': 'ro', - }, MKDOCS_TEMPLATE_DIR: { 'bind': MKDOCS_TEMPLATE_DIR, 'mode': 'ro', diff --git a/readthedocs/doc_builder/templates/doc_builder/conf.py.tmpl b/readthedocs/doc_builder/templates/doc_builder/conf.py.tmpl index a5f0d064c2b..e36cdd16af5 100644 --- a/readthedocs/doc_builder/templates/doc_builder/conf.py.tmpl +++ b/readthedocs/doc_builder/templates/doc_builder/conf.py.tmpl @@ -37,7 +37,6 @@ if not 'html_static_path' in globals(): html_static_path = [] if os.path.exists('_static'): html_static_path.append('_static') -html_static_path.append('{{ static_path }}') # Add RTD Theme only if they aren't overriding it already using_rtd_theme = ( diff --git a/readthedocs/rtd_tests/files/conf.py b/readthedocs/rtd_tests/files/conf.py index 1b65e7b52cb..4007dcfab19 100644 --- a/readthedocs/rtd_tests/files/conf.py +++ b/readthedocs/rtd_tests/files/conf.py @@ -7,7 +7,7 @@ from recommonmark.parser import CommonMarkParser extensions = [] -templates_path = ['/tmp/sphinx-template-dir', 'templates', '_templates', '.templates'] +templates_path = ['templates', '_templates', '.templates'] source_suffix = ['.rst', '.md'] source_parsers = { '.md': CommonMarkParser, diff --git a/readthedocs/rtd_tests/tests/test_doc_builder.py b/readthedocs/rtd_tests/tests/test_doc_builder.py index 154ace66c5d..a384f5d00b7 100644 --- a/readthedocs/rtd_tests/tests/test_doc_builder.py +++ b/readthedocs/rtd_tests/tests/test_doc_builder.py @@ -71,10 +71,6 @@ def test_conf_py_path(self, checkout_path, docs_dir): expected ) - @patch( - 'readthedocs.doc_builder.backends.sphinx.SPHINX_TEMPLATE_DIR', - '/tmp/sphinx-template-dir', - ) @patch('readthedocs.doc_builder.backends.sphinx.BaseSphinx.docs_dir') @patch('readthedocs.doc_builder.backends.sphinx.BaseSphinx.create_index') @patch('readthedocs.doc_builder.backends.sphinx.BaseSphinx.get_config_params') @@ -131,10 +127,6 @@ def test_create_conf_py( ef.readlines()[:autogenerated_confpy_lines] ) - @patch( - 'readthedocs.doc_builder.backends.sphinx.SPHINX_TEMPLATE_DIR', - '/tmp/sphinx-template-dir', - ) @patch('readthedocs.doc_builder.backends.sphinx.BaseSphinx.docs_dir') @patch('readthedocs.doc_builder.backends.sphinx.BaseSphinx.create_index') @patch('readthedocs.doc_builder.backends.sphinx.BaseSphinx.get_config_params') diff --git a/readthedocs/templates/sphinx/conf.py.conf b/readthedocs/templates/sphinx/conf.py.conf index 5854c692ac0..43e7b58b290 100644 --- a/readthedocs/templates/sphinx/conf.py.conf +++ b/readthedocs/templates/sphinx/conf.py.conf @@ -7,7 +7,7 @@ from datetime import datetime from recommonmark.parser import CommonMarkParser extensions = [] -templates_path = ['{{ template_dir }}', 'templates', '_templates', '.templates'] +templates_path = ['templates', '_templates', '.templates'] source_suffix = ['.rst', '.md'] source_parsers = { '.md': CommonMarkParser,