1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42
|
# Usage (DEPRECATED, USE BUILD\_MANPAGES INSTEAD OF BUILD\_MANPAGE)
Download `build_manpage.py` and place it somewhere where Python can
find it.
In your `setup.py` add:
```python
[...]
from build_manpage import build_manpage
setup(
[...]
cmdclass={'build_manpage': build_manpage}
)
```
In your `setup.cfg` add:
```
[build_manpage]
output=data/mymanpage.1
parser=myapp.somemod:get_parser
```
It's also possible to specify filename to use:
```
[build_manpage]
output=data/mymanpage.1
parser=UNUSED:get_parser
parser-file=example.py
```
The `output` is the destination path for the generated
manpage and `parser` is an import path pointing to a optparser
instance or a function returning such an instance.
Note that this doesn't work with `argparse` module. Please use
`build_manpages` (not `build_manpage`) to have argparse support.
Then run `setup.py build_manpage` to build a manpage for
your project.
|