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
|
# Usage
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
```
where `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.
Then run `setup.py build_manpage` to build a manpage for
your project.
|