aboutsummaryrefslogtreecommitdiff
path: root/mesonbuild/scripts
diff options
context:
space:
mode:
Diffstat (limited to 'mesonbuild/scripts')
-rw-r--r--mesonbuild/scripts/gettext.py3
-rw-r--r--mesonbuild/scripts/yelphelper.py3
2 files changed, 2 insertions, 4 deletions
diff --git a/mesonbuild/scripts/gettext.py b/mesonbuild/scripts/gettext.py
index f5c0421..7042863 100644
--- a/mesonbuild/scripts/gettext.py
+++ b/mesonbuild/scripts/gettext.py
@@ -83,8 +83,7 @@ def do_install(src_sub, bld_sub, dest, pkgname, langs):
pkgname + '.mo')
tempfile = outfile + '.tmp'
os.makedirs(os.path.dirname(outfile), exist_ok=True)
- shutil.copyfile(srcfile, tempfile)
- shutil.copystat(srcfile, tempfile)
+ shutil.copy2(srcfile, tempfile)
os.replace(tempfile, outfile)
print('Installing %s to %s' % (srcfile, outfile))
return 0
diff --git a/mesonbuild/scripts/yelphelper.py b/mesonbuild/scripts/yelphelper.py
index 95c8c9c..6bf0673 100644
--- a/mesonbuild/scripts/yelphelper.py
+++ b/mesonbuild/scripts/yelphelper.py
@@ -68,8 +68,7 @@ def install_help(srcdir, blddir, sources, media, langs, install_dir, destdir, pr
infile = os.path.join(srcdir if lang == 'C' else blddir, lang, source)
outfile = os.path.join(indir, source)
mlog.log('Installing %s to %s' % (infile, outfile))
- shutil.copyfile(infile, outfile)
- shutil.copystat(infile, outfile)
+ shutil.copy2(infile, outfile)
for m in media:
infile = os.path.join(srcdir, lang, m)
outfile = os.path.join(indir, m)