mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
Merge pull request #9231 from tk0miya/9217_manpage_section_directory
Fix #9217: manpage: Dirname of man_make_section_directory is wrong
This commit is contained in:
commit
567ff22716
2
CHANGES
2
CHANGES
@ -51,6 +51,8 @@ Bugs fixed
|
||||
* #8597: autodoc: a docsting having metadata only should be treated as
|
||||
undocumented
|
||||
* #9185: autodoc: typehints for overloaded functions and methods are inaccurate
|
||||
* #9217: manpage: The name of manpage directory that is generated by
|
||||
:confval:`man_make_section_directory` is not correct
|
||||
|
||||
Testing
|
||||
--------
|
||||
|
@ -79,8 +79,9 @@ class ManualPageBuilder(Builder):
|
||||
docsettings.section = section
|
||||
|
||||
if self.config.man_make_section_directory:
|
||||
ensuredir(path.join(self.outdir, str(section)))
|
||||
targetname = '%s/%s.%s' % (section, name, section)
|
||||
dirname = 'man%s' % section
|
||||
ensuredir(path.join(self.outdir, dirname))
|
||||
targetname = '%s/%s.%s' % (dirname, name, section)
|
||||
else:
|
||||
targetname = '%s.%s' % (name, section)
|
||||
|
||||
|
@ -34,7 +34,7 @@ def test_all(app, status, warning):
|
||||
confoverrides={'man_make_section_directory': True})
|
||||
def test_man_make_section_directory(app, status, warning):
|
||||
app.build()
|
||||
assert (app.outdir / '1' / 'python.1').exists()
|
||||
assert (app.outdir / 'man1' / 'python.1').exists()
|
||||
|
||||
|
||||
@pytest.mark.sphinx('man', testroot='directive-code')
|
||||
|
Loading…
Reference in New Issue
Block a user