mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-31 14:33:54 -04:00
Improve compression of source tarball
This commit is contained in:
parent
ac847b55a5
commit
63e8f0de50
@ -305,8 +305,12 @@ class Sdist(Command):
|
|||||||
shutil.copytree(self.j(tbase, 'manual'), self.j(tdir, 'translations', 'manual'))
|
shutil.copytree(self.j(tbase, 'manual'), self.j(tdir, 'translations', 'manual'))
|
||||||
|
|
||||||
self.info('\tCreating tarfile...')
|
self.info('\tCreating tarfile...')
|
||||||
subprocess.check_call(['tar', '-cJf', self.a(self.DEST),
|
dest = self.DEST.rpartition('.')[0]
|
||||||
'calibre'], cwd=self.d(tdir))
|
subprocess.check_call(['tar', '-cf', self.a(dest), 'calibre'], cwd=self.d(tdir))
|
||||||
|
self.info('\tCompressing tarfile...')
|
||||||
|
if os.path.exists(self.a(self.DEST)):
|
||||||
|
os.remove(self.a(self.DEST))
|
||||||
|
subprocess.check_call(['xz', '-9', self.a(dest)])
|
||||||
|
|
||||||
def clean(self):
|
def clean(self):
|
||||||
if os.path.exists(self.DEST):
|
if os.path.exists(self.DEST):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user