Drop time-stamp comparison, remove variable comments from generated files.

See discussion at http://tickets.musicbrainz.org/browse/PICARD-566
This commit is contained in:
Laurent Monin
2014-03-31 15:13:19 +02:00
parent dd6a124292
commit d3d418de54

View File

@@ -311,8 +311,13 @@ class picard_build_ui(Command):
tmp = StringIO() tmp = StringIO()
uic.compileUi(uifile, tmp) uic.compileUi(uifile, tmp)
source = tmp.getvalue() source = tmp.getvalue()
rc = re.compile(r'\n\n#.*?(?=\n\n)', re.MULTILINE|re.DOTALL)
comment = (u"\n\n# Automatically generated - don't edit.\n"
u"# Use `python setup.py %s` to update it."
% _get_option_name(self))
for r in list(_translate_re): for r in list(_translate_re):
source = r.sub(r'_(\1)', source) source = r.sub(r'_(\1)', source)
source = rc.sub(comment, source)
f = open(pyfile, "w") f = open(pyfile, "w")
f.write(source) f.write(source)
f.close() f.close()
@@ -322,8 +327,7 @@ class picard_build_ui(Command):
compile_ui(uifile, pyfile) compile_ui(uifile, pyfile)
else: else:
for uifile, pyfile in ui_files(): for uifile, pyfile in ui_files():
if newer(uifile, pyfile): compile_ui(uifile, pyfile)
compile_ui(uifile, pyfile)
from resources import compile, makeqrc from resources import compile, makeqrc
makeqrc.main() makeqrc.main()