[Python-checkins] r52267 - python/branches/release25-maint/Mac/BuildScript/build-installer.py

ronald.oussoren python-checkins at python.org
Tue Oct 10 09:54:25 CEST 2006


Author: ronald.oussoren
Date: Tue Oct 10 09:54:24 2006
New Revision: 52267

Modified:
   python/branches/release25-maint/Mac/BuildScript/build-installer.py
Log:
Macosx: fix permission problem in generated installer


Modified: python/branches/release25-maint/Mac/BuildScript/build-installer.py
==============================================================================
--- python/branches/release25-maint/Mac/BuildScript/build-installer.py	(original)
+++ python/branches/release25-maint/Mac/BuildScript/build-installer.py	Tue Oct 10 09:54:24 2006
@@ -10,6 +10,7 @@
 Usage: see USAGE variable in the script.
 """
 import platform, os, sys, getopt, textwrap, shutil, urllib2, stat, time, pwd
+import grp
 
 INCLUDE_TIMESTAMP=1
 VERBOSE=1
@@ -657,9 +658,13 @@
 
     print "Fix file modes"
     frmDir = os.path.join(rootDir, 'Library', 'Frameworks', 'Python.framework')
+    gid = grp.getgrnam('admin').gr_gid
+
     for dirpath, dirnames, filenames in os.walk(frmDir):
         for dn in dirnames:
             os.chmod(os.path.join(dirpath, dn), 0775)
+            os.chown(os.path.join(dirpath, dn), -1, gid)
+            
 
         for fn in filenames:
             if os.path.islink(fn):
@@ -668,7 +673,8 @@
             # "chmod g+w $fn"
             p = os.path.join(dirpath, fn)
             st = os.stat(p)
-            os.chmod(p, stat.S_IMODE(st.st_mode) | stat.S_IXGRP)
+            os.chmod(p, stat.S_IMODE(st.st_mode) | stat.S_IWGRP)
+            os.chown(p, -1, gid)
 
     # We added some directories to the search path during the configure
     # phase. Remove those because those directories won't be there on


More information about the Python-checkins mailing list