From d5f8e89ed3b3d92df501e01b5024870a678ab0d1 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Fri, 1 Aug 2014 11:21:29 +0530 Subject: [PATCH] Add version number to base directory in source tarball. Also fix generation of sources for the qt 5 betas --- setup/install.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/setup/install.py b/setup/install.py index 757fe75fc3..b003af4a2f 100644 --- a/setup/install.py +++ b/setup/install.py @@ -268,10 +268,10 @@ class Sdist(Command): os.makedirs(self.d(self.DEST)) tdir = tempfile.mkdtemp() atexit.register(shutil.rmtree, tdir) - tdir = self.j(tdir, 'calibre') + tdir = self.j(tdir, 'calibre-%s' % __version__) self.info('\tRunning git export...') os.mkdir(tdir) - subprocess.check_call('git archive master | tar -x -C ' + tdir, shell=True) + subprocess.check_call('git archive HEAD | tar -x -C ' + tdir, shell=True) for x in open('.gitignore').readlines(): if not x.startswith('resources/'): continue @@ -306,7 +306,7 @@ class Sdist(Command): self.info('\tCreating tarfile...') dest = self.DEST.rpartition('.')[0] - subprocess.check_call(['tar', '-cf', self.a(dest), 'calibre'], cwd=self.d(tdir)) + subprocess.check_call(['tar', '-cf', self.a(dest), 'calibre-%s' % __version__], cwd=self.d(tdir)) self.info('\tCompressing tarfile...') if os.path.exists(self.a(self.DEST)): os.remove(self.a(self.DEST))