mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
Fix #4623: sphinx.build_main no longer exists in 1.7.0
This commit is contained in:
parent
26592abbab
commit
911f74f467
4
CHANGES
4
CHANGES
@ -10,6 +10,9 @@ Incompatible changes
|
|||||||
Deprecated
|
Deprecated
|
||||||
----------
|
----------
|
||||||
|
|
||||||
|
* #4623: ``sphinx.build_main()`` is deprecated. Use
|
||||||
|
``sphinx.cmd.build.build_main()`` instead.
|
||||||
|
|
||||||
Features added
|
Features added
|
||||||
--------------
|
--------------
|
||||||
|
|
||||||
@ -19,6 +22,7 @@ Bugs fixed
|
|||||||
* #4608: epub: Invalid meta tag is generated
|
* #4608: epub: Invalid meta tag is generated
|
||||||
* #4260: autodoc: keyword only argument separator is not disappeared if it is
|
* #4260: autodoc: keyword only argument separator is not disappeared if it is
|
||||||
appeared at top of the argument list
|
appeared at top of the argument list
|
||||||
|
* #4623: sphinx.build_main no longer exists in 1.7.0
|
||||||
|
|
||||||
Testing
|
Testing
|
||||||
--------
|
--------
|
||||||
|
@ -15,6 +15,7 @@
|
|||||||
from __future__ import absolute_import
|
from __future__ import absolute_import
|
||||||
|
|
||||||
import os
|
import os
|
||||||
|
import sys
|
||||||
import warnings
|
import warnings
|
||||||
from os import path
|
from os import path
|
||||||
|
|
||||||
@ -69,6 +70,26 @@ def main(*args, **kwargs):
|
|||||||
return build.main(*args, **kwargs)
|
return build.main(*args, **kwargs)
|
||||||
|
|
||||||
|
|
||||||
|
def build_main(argv=sys.argv[1:]):
|
||||||
|
"""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)
|
||||||
|
|
||||||
|
|
||||||
|
def make_main(argv=sys.argv[1:]):
|
||||||
|
"""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)
|
||||||
|
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
warnings.warn(
|
warnings.warn(
|
||||||
'`sphinx` has moved to `sphinx.build`.',
|
'`sphinx` has moved to `sphinx.build`.',
|
||||||
|
Loading…
Reference in New Issue
Block a user