From 6bc70dc2f48e24118425416e24ef1857ab24d82f Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Mon, 26 May 2014 09:03:44 +0530 Subject: [PATCH] Port sdist to use the new translations layout --- setup/install.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/setup/install.py b/setup/install.py index a132f449e7..c7c8800a99 100644 --- a/setup/install.py +++ b/setup/install.py @@ -293,14 +293,14 @@ class Sdist(Command): dest = os.path.join(tdir, self.d(f)) shutil.copy2(f, dest) - tbase = self.j(self.d(self.d(self.SRC)), 'calibre-translations') - for x in ('setup/iso_639', 'src/calibre/translations'): - destdir = self.j(tdir, x) + tbase = self.j(self.d(self.SRC), 'translations') + for x in ('iso_639', 'calibre'): + destdir = self.j(tdir, 'translations', x) if not os.path.exists(destdir): - os.mkdir(destdir) - for y in glob.glob(self.j(tbase, x, '*')): + os.makedirs(destdir) + for y in glob.glob(self.j(tbase, x, '*.po')) + glob.glob(self.j(tbase, x, '*.pot')): dest = self.j(destdir, self.b(y)) - if y.rpartition('.')[-1] not in {'pyc', 'pyo'} and not os.path.exists(dest): + if not os.path.exists(dest): shutil.copy2(y, dest) self.info('\tCreating tarfile...')