docs: fix manpage names being truncated

In commit d2e7377c0f, the documentation
directories were reorganized, resulting in `fname_base` (the path that
Sphinx looked for source files) to no longer expect the leading 'man/'.
This was always also stripped from the `outname`, which now strips four
characters twice over.

Fix by reducing the stripped length to only the length of the prefix in
fname_base itself.
This commit is contained in:
Eli Schwartz 2019-07-17 22:53:17 -04:00
parent a53e571b87
commit f3f63c0f82
No known key found for this signature in database
GPG Key ID: CEB167EFB5722BD6
1 changed files with 1 additions and 1 deletions

View File

@ -277,7 +277,7 @@ man_pages = [
# appropriate name and details
for fname in glob.glob('man/commands/*.rst'):
fname_base = fname[4:-4]
outname = 'pip-' + fname_base[13:]
outname = 'pip-' + fname_base[9:]
description = u'description of {} command'.format(
outname.replace('-', ' ')
)