summaryrefslogtreecommitdiff
path: root/setup.py
diff options
context:
space:
mode:
authorBarry Warsaw2007-07-17 23:28:21 -0400
committerBarry Warsaw2007-07-17 23:28:21 -0400
commit012fcb71e7e634b985219a7d5cf0deda87a2aa90 (patch)
tree0fbc8d80d5d235c29c63e03f48c8bbbe3d04700e /setup.py
parent8d0c0a003d5cdb23a87674e1f411e9515513b17c (diff)
downloadmailman-012fcb71e7e634b985219a7d5cf0deda87a2aa90.tar.gz
mailman-012fcb71e7e634b985219a7d5cf0deda87a2aa90.tar.zst
mailman-012fcb71e7e634b985219a7d5cf0deda87a2aa90.zip
Diffstat (limited to 'setup.py')
-rw-r--r--setup.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/setup.py b/setup.py
index 975b808a1..f86a7a9a2 100644
--- a/setup.py
+++ b/setup.py
@@ -40,8 +40,12 @@ for dirpath, dirnames, filenames in os.walk(start_dir):
for filename in filenames:
po_file = os.path.join(dirpath, filename)
basename, ext = os.path.splitext(po_file)
+ if ext <> '.po':
+ continue
mo_file = basename + '.mo'
- if ext == '.po' and not os.path.exists(mo_file):
+ if (not os.path.exists(mo_file) or
+ os.path.getmtime(po_file) > os.path.getmtime(mo_file)):
+ # The mo file doesn't exist or is older than the po file.
os.system('bin/msgfmt.py -o %s %s' % (mo_file, po_file))