mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
Merge pull request #4624 from tk0miya/4623_sphinx.build_main
Fix #4623: sphinx.build_main no longer exists in 1.7.0
This commit is contained in:
commit
c8dbf60226
5
CHANGES
5
CHANGES
@ -10,6 +10,9 @@ Incompatible changes
|
||||
Deprecated
|
||||
----------
|
||||
|
||||
* #4623: ``sphinx.build_main()`` is deprecated. Use
|
||||
``sphinx.cmd.build.build_main()`` instead.
|
||||
|
||||
Features added
|
||||
--------------
|
||||
|
||||
@ -22,6 +25,8 @@ Bugs fixed
|
||||
* #4622: epub: :confval:`epub_scheme` does not effect to content.opf
|
||||
* #4627: graphviz: Fit graphviz images to page
|
||||
* #4617: quickstart: PROJECT_DIR argument is required
|
||||
* #4623: sphinx.build_main no longer exists in 1.7.0
|
||||
* #4615: The argument of ``sphinx.build`` has been changed in 1.7.0
|
||||
|
||||
Testing
|
||||
--------
|
||||
|
@ -15,6 +15,7 @@
|
||||
from __future__ import absolute_import
|
||||
|
||||
import os
|
||||
import sys
|
||||
import warnings
|
||||
from os import path
|
||||
|
||||
@ -66,9 +67,30 @@ def main(*args, **kwargs):
|
||||
RemovedInSphinx20Warning,
|
||||
stacklevel=2,
|
||||
)
|
||||
args = args[1:] # skip first argument to adjust arguments (refs: #4615)
|
||||
return build.main(*args, **kwargs)
|
||||
|
||||
|
||||
def build_main(argv=sys.argv):
|
||||
"""Sphinx build "main" command-line entry."""
|
||||
warnings.warn(
|
||||
'`sphinx.build_main()` has moved to `sphinx.cmd.build.build_main()`.',
|
||||
RemovedInSphinx20Warning,
|
||||
stacklevel=2,
|
||||
)
|
||||
return build.build_main(argv[1:]) # skip first argument to adjust arguments (refs: #4615)
|
||||
|
||||
|
||||
def make_main(argv=sys.argv):
|
||||
"""Sphinx build "make mode" entry."""
|
||||
warnings.warn(
|
||||
'`sphinx.build_main()` has moved to `sphinx.cmd.build.make_main()`.',
|
||||
RemovedInSphinx20Warning,
|
||||
stacklevel=2,
|
||||
)
|
||||
return build.make_main(argv[1:]) # skip first argument to adjust arguments (refs: #4615)
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
from .cmd import build
|
||||
warnings.warn(
|
||||
|
@ -21,6 +21,7 @@ def main(*args, **kwargs):
|
||||
RemovedInSphinx20Warning,
|
||||
stacklevel=2,
|
||||
)
|
||||
args = args[1:] # skip first argument to adjust arguments (refs: #4615)
|
||||
_main(*args, **kwargs)
|
||||
|
||||
|
||||
|
@ -22,6 +22,7 @@ def main(*args, **kwargs):
|
||||
RemovedInSphinx20Warning,
|
||||
stacklevel=2,
|
||||
)
|
||||
args = args[1:] # skip first argument to adjust arguments (refs: #4615)
|
||||
_main(*args, **kwargs)
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user