mirror of
https://github.com/openSUSE/osc.git
synced 2025-02-03 10:06:17 +01:00
- fixed manpage generation: in build environments like the obs we cannot call 'osccli.main(argv = ['osc','man'])' because osc would except a config file etc.
- enabled manpage generation again
This commit is contained in:
parent
aa9f93b851
commit
c3405ae489
10
setup.py
10
setup.py
@ -21,12 +21,16 @@ class build_osc(distutils.command.build.build, object):
|
||||
distutils.log.info('generating %s' % man_path)
|
||||
outfile = gzip.open(man_path, 'w')
|
||||
osccli = commandline.Osc(stdout = outfile)
|
||||
osccli.main(argv = ['osc','man'])
|
||||
# FIXME: we cannot call the main method because osc expects an ~/.oscrc file
|
||||
# (this would break builds in environments like the obs)
|
||||
#osccli.main(argv = ['osc','man'])
|
||||
osccli.optparser = osccli.get_optparser()
|
||||
osccli.do_man(None)
|
||||
outfile.close()
|
||||
|
||||
def run(self):
|
||||
super(build_osc, self).run()
|
||||
#self.build_man_page()
|
||||
self.build_man_page()
|
||||
|
||||
setup(name='osc',
|
||||
version=osc.core.__version__,
|
||||
@ -41,7 +45,7 @@ setup(name='osc',
|
||||
|
||||
packages=['osc', 'osc.util'],
|
||||
scripts=['osc_hotshot.py', 'osc-wrapper.py'],
|
||||
#data_files=[(os.path.join('share','man','man1'), [os.path.join('build', 'osc.1.gz')])],
|
||||
data_files=[(os.path.join('share','man','man1'), [os.path.join('build', 'osc.1.gz')])],
|
||||
|
||||
# Override certain command classes with our own ones
|
||||
cmdclass = {
|
||||
|
Loading…
Reference in New Issue
Block a user