Restore always trying to build the msg catalogs, and

remove the source .mo file when done copying it. (Because they're not committed to wxWidgets repo anymore.)
This commit is contained in:
Robin Dunn
2019-05-28 14:50:06 -07:00
parent a8a434e071
commit 23fe71ff6d
2 changed files with 10 additions and 13 deletions

View File

@@ -1336,19 +1336,16 @@ def cmd_build_wx(options, args):
traceback.print_exc()
sys.exit(1)
if not options.release:
print("WARNING: Building message catalogs skipped.")
# Build the wx message catalogs, but first check that there is a msgfmt
# command available
if findCmd('msgfmt'):
locale_pwd = pushDir(posixjoin(wxDir(), 'locale'))
print('Building message catalogs in ' + os.getcwd())
runcmd('make allmo')
del locale_pwd
else:
# Build the wx message catalogs, but first check that there is a msgfmt
# command available
if findCmd('msgfmt'):
locale_pwd = pushDir(posixjoin(wxDir(), 'locale'))
print('Building message catalogs in ' + os.getcwd())
runcmd('make allmo')
del locale_pwd
else:
print("WARNING: msgfmt command not found, message catalogs not rebulit.\n"
" Please install gettext and associated tools.")
print("WARNING: msgfmt command not found, message catalogs not rebulit.\n"
" Please install gettext and associated tools.")

View File

@@ -1,5 +1,4 @@
#----------------------------------------------------------------------
#----------------------------------------------------------------------
# Name: buildtools.config
# Purpose: Code to set and validate platform options and etc. for
# the wxPython build. Moved to their own module and
@@ -438,6 +437,7 @@ class Configuration(object):
dest = opj(destdir, lang, 'LC_MESSAGES')
mkpath(dest, verbose=verbose)
copy_file(src, opj(dest, 'wxstd.mo'), update=1, verbose=verbose)
os.unlink(src)
self.CLEANUP.append(opj(dest, 'wxstd.mo'))
self.CLEANUP.append(dest)