mirror of
https://github.com/openSUSE/osc.git
synced 2025-02-24 19:22:13 +01:00
- fixed setup.py
- compress manpage
This commit is contained in:
parent
ef94ae807c
commit
1bb63e4ab7
10
setup.py
10
setup.py
@ -16,15 +16,17 @@ class build_osc(distutils.command.build.build, object):
|
|||||||
def build_man_page(self):
|
def build_man_page(self):
|
||||||
"""
|
"""
|
||||||
"""
|
"""
|
||||||
man_path = os.path.join('build', 'osc.1')
|
import gzip
|
||||||
|
man_path = os.path.join('build', 'osc.1.gz')
|
||||||
distutils.log.info('generating %s' % man_path)
|
distutils.log.info('generating %s' % man_path)
|
||||||
outfile = file(man_path, 'w')
|
outfile = gzip.open(man_path, 'w')
|
||||||
osccli = commandline.Osc(stdout = outfile)
|
osccli = commandline.Osc(stdout = outfile)
|
||||||
osccli.main(argv = ['osc','man'])
|
osccli.main(argv = ['osc','man'])
|
||||||
|
outfile.close()
|
||||||
|
|
||||||
def run(self):
|
def run(self):
|
||||||
self.build_man_page()
|
|
||||||
super(build_osc, self).run()
|
super(build_osc, self).run()
|
||||||
|
self.build_man_page()
|
||||||
|
|
||||||
setup(name='osc',
|
setup(name='osc',
|
||||||
version=osc.core.__version__,
|
version=osc.core.__version__,
|
||||||
@ -39,7 +41,7 @@ setup(name='osc',
|
|||||||
|
|
||||||
packages=['osc', 'osc.util'],
|
packages=['osc', 'osc.util'],
|
||||||
scripts=['osc_hotshot.py', 'osc-wrapper.py'],
|
scripts=['osc_hotshot.py', 'osc-wrapper.py'],
|
||||||
data_files=[(os.path.join('share','man','man1'), [os.path.join('build', 'osc.1')])],
|
data_files=[(os.path.join('share','man','man1'), [os.path.join('build', 'osc.1.gz')])],
|
||||||
|
|
||||||
# Override certain command classes with our own ones
|
# Override certain command classes with our own ones
|
||||||
cmdclass = {
|
cmdclass = {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user