From 4e72d22a08687eb19c1a9358d0b7bc5bdf932eb7 Mon Sep 17 00:00:00 2001 Message-Id: <4e72d22a08687eb19c1a9358d0b7bc5bdf932eb7.1715173380.git.mdw@distorted.org.uk> From: Mark Wooding Date: Mon, 24 Mar 2008 09:38:30 +0000 Subject: [PATCH] Set umask to 0022 during the setup.py execution Organization: Straylight/Edgeware From: Catalin Marinas This allows template files to be installed with the proper rights. Signed-off-by: Catalin Marinas --- setup.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/setup.py b/setup.py index 7b0ded5..d90cf5b 100755 --- a/setup.py +++ b/setup.py @@ -1,6 +1,6 @@ #!/usr/bin/env python -import sys, glob +import sys, glob, os from distutils.core import setup from stgit.version import version, git_min_ver, python_min_ver @@ -48,6 +48,9 @@ if sys.argv[1] in ['install', 'build']: __check_python_version() __check_git_version() +# ensure readable template files +old_mask = os.umask(0022) + setup(name = 'stgit', version = version, license = 'GPLv2', @@ -66,3 +69,6 @@ setup(name = 'stgit', 'contrib/stgit-completion.bash']), ('share/doc/stgit', glob.glob('doc/*.txt'))] ) + +# restore the old mask +os.umask(old_mask) -- [mdw]