Ensure that the locale message catalogs are included in the source and binary archives.

This commit is contained in:
Robin Dunn
2017-08-11 15:46:04 -07:00
parent 9cfe80a912
commit 0879cdc240
4 changed files with 14 additions and 8 deletions

View File

@@ -7,6 +7,7 @@
#
recursive-include wx **
recursive-include wx/locale **
recursive-include license *.txt
include LICENSE.txt
graft docs

View File

@@ -1422,7 +1422,7 @@ def cmd_build_py(options, args):
runcmd(cmd)
copyWxDlls(options)
if isWindows or isDarwin:
cfg = Config()
cfg.build_locale_dir(opj(cfg.PKGDIR, 'locale'))
@@ -1753,15 +1753,21 @@ def cmd_sdist(options, args):
for name in glob.glob(posixjoin('sip', srcdir, '*')):
copyFile(name, destdir)
for wc in ['*.py', '*.pi', '*.pyi']:
destdir = posixjoin(PDEST, 'wx')
for name in glob.glob(posixjoin('wx', wc)):
destdir = posixjoin(PDEST, cfg.PKGDIR)
for name in glob.glob(posixjoin(cfg.PKGDIR, wc)):
copyFile(name, destdir)
# Copy the license files from wxWidgets
msg('Copying license files...')
updateLicenseFiles(cfg)
shutil.copytree('license', opj(PDEST, 'license'))
copyFile('LICENSE.txt', PDEST)
# Copy the locale message catalogs
msg('Copying message catalog files...')
cfg.build_locale_dir(opj(cfg.PKGDIR, 'locale'))
shutil.copytree(opj(cfg.PKGDIR, 'locale'), opj(PDEST, cfg.PKGDIR, 'locale'))
# Also add the waf executable, fetching it first if we don't already have it
getWafCmd()
copyFile('bin/waf-%s' % wafCurrentVersion, os.path.join(PDEST, 'bin'))

View File

@@ -413,7 +413,7 @@ class Configuration(object):
def build_locale_dir(self, destdir, verbose=1):
"""Build a locale dir under the wxPython package. Used for MSW and OSX"""
"""Build a locale dir under the wxPython package."""
moFiles = glob.glob(opj(self.WXDIR, 'locale', '*.mo'))
for src in moFiles:
lang = os.path.splitext(os.path.basename(src))[0]

View File

@@ -492,7 +492,6 @@ def build(bld):
# copy the wx locale message catalogs to the package dir
if isWindows or isDarwin:
cfg.build_locale_dir(opj(cfg.PKGDIR, 'locale'))
# copy __init__.py