From 2ee5ad2e301c7acfb7a3b137a998b71d8ac87d52 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Sat, 22 Jun 2013 08:30:59 +0530 Subject: [PATCH] Ensure dist files have correct permissions --- setup/upload.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/setup/upload.py b/setup/upload.py index a113eef703..784c0cf9f8 100644 --- a/setup/upload.py +++ b/setup/upload.py @@ -151,8 +151,10 @@ class UploadInstallers(Command): # {{{ shutil.copyfile(hosting, os.path.join(tdir, 'hosting.py')) for f in files: - shutil.copyfile(f, os.path.join(tdir, f)) - shutil.copyfile(f, os.path.join(backup, f)) + for x in (tdir, backup): + dest = os.path.join(x, f) + shutil.copyfile(f, dest) + os.chmod(dest, stat.S_IREAD|stat.S_IWRITE|stat.S_IRGRP|stat.S_IROTH) with open(os.path.join(tdir, 'fmap'), 'wb') as fo: for f, desc in files.iteritems():