mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
Remove sphinx.cmd.build
The preparation of moving ``sphinx.cmdline`` to ``sphinx.cmd.build``, I just removed ``sphinx.cmd.build``.
This commit is contained in:
parent
2602be13bc
commit
6ae801fee0
@ -1,42 +0,0 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
"""
|
||||
sphinx.cmd.build
|
||||
~~~~~~~~~~~~~~~~
|
||||
|
||||
Build documentation from a provided source.
|
||||
|
||||
:copyright: Copyright 2007-2018 by the Sphinx team, see AUTHORS.
|
||||
:license: BSD, see LICENSE for details.
|
||||
"""
|
||||
|
||||
import sys
|
||||
|
||||
if False:
|
||||
# For type annotation
|
||||
from typing import List # NOQA
|
||||
|
||||
|
||||
def build_main(argv=sys.argv[1:]):
|
||||
# type: (List[str]) -> int
|
||||
"""Sphinx build "main" command-line entry."""
|
||||
from sphinx import cmdline
|
||||
return cmdline.main(argv) # type: ignore
|
||||
|
||||
|
||||
def make_main(argv=sys.argv[1:]):
|
||||
# type: (List[str]) -> int
|
||||
"""Sphinx build "make mode" entry."""
|
||||
from sphinx import make_mode
|
||||
return make_mode.run_make_mode(argv[1:]) # type: ignore
|
||||
|
||||
|
||||
def main(argv=sys.argv[1:]):
|
||||
# type: (List[str]) -> int
|
||||
if sys.argv[1:2] == ['-M']:
|
||||
return make_main(argv)
|
||||
else:
|
||||
return build_main(argv)
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
sys.exit(main(sys.argv[1:]))
|
Loading…
Reference in New Issue
Block a user