lrossett / centos / centpkg

Forked from centos/centpkg 4 years ago
Clone
74122f
# Print a man page from the help texts.
74122f
import os
74122f
import sys
74122f
74122f
from six.moves.configparser import ConfigParser
74122f
74122f
if __name__ == '__main__':
74122f
    module_path = os.path.abspath(os.path.join(os.path.dirname(__file__), '..'))
74122f
    sys.path.insert(0, module_path)
74122f
74122f
    config = ConfigParser()
74122f
    config.read(os.path.join(module_path, 'src', 'centpkg.conf'))
74122f
74122f
    import pyrpkg.man_gen
74122f
    try:
74122f
        import centpkg
74122f
    except ImportError:
74122f
        sys.path.append('src/')
74122f
        import centpkg
74122f
    client = centpkg.cli.centpkgClient(config=config, name='centpkg')
74122f
    pyrpkg.man_gen.generate(client.parser,
74122f
                            client.subparsers,
74122f
                            identity='centpkg',
74122f
                            sourceurl='https://git.centos.org/centos/centpkg')