Add man pages to the source tarball

This commit is contained in:
Kovid Goyal 2017-07-04 13:06:33 +05:30
parent 154ceb6340
commit 556c32b6b8
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

View File

@ -44,6 +44,7 @@ sys.path = sys.path[1:]
sys.exit(complete.main()) sys.exit(complete.main())
''' '''
class Develop(Command): class Develop(Command):
description = textwrap.dedent('''\ description = textwrap.dedent('''\
@ -265,6 +266,7 @@ class Install(Develop):
self.info('\n\ncalibre successfully installed. You can start' self.info('\n\ncalibre successfully installed. You can start'
' it by running the command calibre') ' it by running the command calibre')
class Sdist(Command): class Sdist(Command):
description = 'Create a source distribution' description = 'Create a source distribution'
@ -310,6 +312,7 @@ class Sdist(Command):
if not os.path.exists(dest): if not os.path.exists(dest):
shutil.copy2(y, dest) shutil.copy2(y, dest)
shutil.copytree(self.j(tbase, 'manual'), self.j(tdir, 'translations', 'manual')) shutil.copytree(self.j(tbase, 'manual'), self.j(tdir, 'translations', 'manual'))
self.add_man_pages(self.j(tdir, 'man-pages'))
self.info('\tCreating tarfile...') self.info('\tCreating tarfile...')
dest = self.DEST.rpartition('.')[0] dest = self.DEST.rpartition('.')[0]
@ -319,10 +322,15 @@ class Sdist(Command):
os.remove(self.a(self.DEST)) os.remove(self.a(self.DEST))
subprocess.check_call(['xz', '-9', self.a(dest)]) subprocess.check_call(['xz', '-9', self.a(dest)])
def add_man_pages(self, dest):
from setup.commands import man_pages
man_pages.build_man_pages(dest)
def clean(self): def clean(self):
if os.path.exists(self.DEST): if os.path.exists(self.DEST):
os.remove(self.DEST) os.remove(self.DEST)
class Bootstrap(Command): class Bootstrap(Command):
description = 'Bootstrap a fresh checkout of calibre from git to a state where it can be installed. Requires various development tools/libraries/headers' description = 'Bootstrap a fresh checkout of calibre from git to a state where it can be installed. Requires various development tools/libraries/headers'