summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTakeshi KOMIYA <i.tkomiya@gmail.com>2018-07-29 21:48:14 +0900
committerTakeshi KOMIYA <i.tkomiya@gmail.com>2018-07-29 22:24:56 +0900
commit4e30f494c413e8c360aac3a3a399cf12eec5c704 (patch)
treeec0ca6924dc25f8805938bda91f8b10af03441a9
parentb0c3a8fc8e00b31899eca0859b63e1e38f76d58e (diff)
downloadsphinx-git-4e30f494c413e8c360aac3a3a399cf12eec5c704.tar.gz
Add new sphinx.make_mode package for compatibility
-rw-r--r--sphinx/make_mode.py39
1 files changed, 39 insertions, 0 deletions
diff --git a/sphinx/make_mode.py b/sphinx/make_mode.py
new file mode 100644
index 000000000..4510fc0eb
--- /dev/null
+++ b/sphinx/make_mode.py
@@ -0,0 +1,39 @@
+# -*- coding: utf-8 -*-
+"""
+ sphinx.make_mode
+ ~~~~~~~~~~~~~~~~
+
+ sphinx-build -M command-line handling.
+
+ This replaces the old, platform-dependent and once-generated content
+ of Makefile / make.bat.
+
+ This is in its own module so that importing it is fast. It should not
+ import the main Sphinx modules (like sphinx.applications, sphinx.builders).
+
+ :copyright: Copyright 2007-2018 by the Sphinx team, see AUTHORS.
+ :license: BSD, see LICENSE for details.
+"""
+
+import warnings
+
+from sphinx.cmd import make_mode
+from sphinx.deprecation import RemovedInSphinx30Warning
+
+
+BUILDERS = make_mode.BUILDERS
+
+
+class Make(make_mode.Make):
+ def __init__(self, *args):
+ warnings.warn('sphinx.make_mode.Make is deprecated. '
+ 'Please use sphinx.cmd.make_mode.Make instead.',
+ RemovedInSphinx30Warning)
+ super(Make, self).__init__(*args)
+
+
+def run_make_mode(args):
+ warnings.warn('sphinx.make_mode.run_make_mode() is deprecated. '
+ 'Please use sphinx.cmd.make_mode.run_make_mode() instead.',
+ RemovedInSphinx30Warning)
+ return make_mode.run_make_mode(args)