Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update mkdocs #5505

Merged
merged 3 commits into from Apr 2, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
3 changes: 1 addition & 2 deletions readthedocs/doc_builder/backends/mkdocs.py
@@ -1,10 +1,9 @@
# -*- coding: utf-8 -*-

"""
MkDocs_ backend for building docs.

.. _MkDocs: http://www.mkdocs.org/
"""

import json
import logging
import os
Expand Down
12 changes: 7 additions & 5 deletions readthedocs/doc_builder/python_environments.py
@@ -1,5 +1,3 @@
# -*- coding: utf-8 -*-

"""An abstraction over virtualenv and Conda environments."""

import copy
Expand All @@ -9,8 +7,6 @@
import os
import shutil

from django.conf import settings

from readthedocs.config import PIP, SETUPTOOLS
from readthedocs.config.models import PythonInstall, PythonInstallRequirements
from readthedocs.doc_builder.config import load_yaml_config
Expand Down Expand Up @@ -295,7 +291,13 @@ def install_core_requirements(self):
]

if self.config.doctype == 'mkdocs':
requirements.append('mkdocs==0.17.3')
requirements.append(
self.project.get_feature_value(
Feature.DEFAULT_TO_MKDOCS_0_17_3,
positive='mkdocs==0.17.3',
negative='mkdocs<1.1',
),
)
else:
# We will assume semver here and only automate up to the next
# backward incompatible release: 2.x
Expand Down
5 changes: 5 additions & 0 deletions readthedocs/projects/models.py
Expand Up @@ -1312,6 +1312,7 @@ def add_features(sender, **kwargs):
USE_TESTING_BUILD_IMAGE = 'use_testing_build_image'
SHARE_SPHINX_DOCTREE = 'share_sphinx_doctree'
USE_PDF_LATEXMK = 'use_pdf_latexmk'
DEFAULT_TO_MKDOCS_0_17_3 = 'default_to_mkdocs_0_17_3'

FEATURES = (
(USE_SPHINX_LATEST, _('Use latest version of Sphinx')),
Expand Down Expand Up @@ -1346,6 +1347,10 @@ def add_features(sender, **kwargs):
SHARE_SPHINX_DOCTREE,
_('Use shared directory for doctrees'),
),
(
DEFAULT_TO_MKDOCS_0_17_3,
_('Install mkdocs 0.17.3 by default')
),
)

projects = models.ManyToManyField(
Expand Down