gnome.yelp(): Handle platforms where symlink not supported

pull/1924/head
Patrick Griffis 8 years ago
parent cacc8d99ce
commit b2d9e4c1c0
  1. 7
      mesonbuild/scripts/yelphelper.py

@ -80,8 +80,11 @@ def install_help(srcdir, blddir, sources, media, langs, install_dir, destdir, pr
mlog.log('Symlinking %s to %s.' % (outfile, srcfile)) mlog.log('Symlinking %s to %s.' % (outfile, srcfile))
if '/' in m or '\\' in m: if '/' in m or '\\' in m:
os.makedirs(os.path.dirname(outfile), exist_ok=True) os.makedirs(os.path.dirname(outfile), exist_ok=True)
os.symlink(srcfile, outfile) try:
continue os.symlink(srcfile, outfile)
continue
except (NotImplementedError, OSError):
mlog.warning('Symlinking not supported, falling back to copying')
else: else:
# Lang doesn't have media file so copy it over 'C' one # Lang doesn't have media file so copy it over 'C' one
infile = os.path.join(srcdir, 'C', m) infile = os.path.join(srcdir, 'C', m)

Loading…
Cancel
Save