mirror of
https://github.com/wxWidgets/Phoenix.git
synced 2026-01-04 19:10:09 +01:00
Ensure that the locale message catalogs are included in the source and binary archives.
This commit is contained in:
@@ -7,6 +7,7 @@
|
||||
#
|
||||
|
||||
recursive-include wx **
|
||||
recursive-include wx/locale **
|
||||
recursive-include license *.txt
|
||||
include LICENSE.txt
|
||||
graft docs
|
||||
|
||||
16
build.py
16
build.py
@@ -1422,9 +1422,9 @@ def cmd_build_py(options, args):
|
||||
runcmd(cmd)
|
||||
|
||||
copyWxDlls(options)
|
||||
if isWindows or isDarwin:
|
||||
cfg = Config()
|
||||
cfg.build_locale_dir(opj(cfg.PKGDIR, 'locale'))
|
||||
|
||||
cfg = Config()
|
||||
cfg.build_locale_dir(opj(cfg.PKGDIR, 'locale'))
|
||||
|
||||
print("\n------------ BUILD FINISHED ------------")
|
||||
print("To use wxPython from the build folder (without installing):")
|
||||
@@ -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'))
|
||||
|
||||
@@ -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]
|
||||
|
||||
3
wscript
3
wscript
@@ -492,8 +492,7 @@ 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'))
|
||||
cfg.build_locale_dir(opj(cfg.PKGDIR, 'locale'))
|
||||
|
||||
# copy __init__.py
|
||||
copy_file('src/__init__.py', cfg.PKGDIR, update=1, verbose=1)
|
||||
|
||||
Reference in New Issue
Block a user