mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
Fix #5125: sphinx-build: Interface of `sphinx:main()
` has changed
This commit is contained in:
parent
e78133a83e
commit
b6c4ebc37a
1
CHANGES
1
CHANGES
@ -33,6 +33,7 @@ Bugs fixed
|
||||
* #5091: latex: curly braces in index entries are not handled correctly
|
||||
* #5070: epub: Wrong internal href fragment links
|
||||
* #5104: apidoc: Interface of ``sphinx.apidoc:main()`` has changed
|
||||
* #5125: sphinx-build: Interface of ``sphinx:main()`` has changed
|
||||
|
||||
Testing
|
||||
--------
|
||||
|
@ -60,15 +60,15 @@ if __version__.endswith('+'):
|
||||
pass
|
||||
|
||||
|
||||
def main(*args, **kwargs):
|
||||
def main(argv=sys.argv):
|
||||
from .cmd import build
|
||||
warnings.warn(
|
||||
'`sphinx.main()` has moved to `sphinx.cmd.build.main()`.',
|
||||
RemovedInSphinx20Warning,
|
||||
stacklevel=2,
|
||||
)
|
||||
args = args[1:] # skip first argument to adjust arguments (refs: #4615)
|
||||
return build.main(*args, **kwargs)
|
||||
argv = argv[1:] # skip first argument to adjust arguments (refs: #4615)
|
||||
return build.main(argv)
|
||||
|
||||
|
||||
def build_main(argv=sys.argv):
|
||||
|
Loading…
Reference in New Issue
Block a user