mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Port sdist to use the new translations layout
This commit is contained in:
parent
2363f44a65
commit
6bc70dc2f4
@ -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...')
|
||||
|
Loading…
x
Reference in New Issue
Block a user