commit-gnue
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[gnue] r9673 - in trunk/gnue-common: . src/setup


From: reinhard
Subject: [gnue] r9673 - in trunk/gnue-common: . src/setup
Date: Wed, 6 Jun 2007 03:46:12 -0500 (CDT)

Author: reinhard
Date: 2007-06-06 03:46:11 -0500 (Wed, 06 Jun 2007)
New Revision: 9673

Modified:
   trunk/gnue-common/setup.py
   trunk/gnue-common/src/setup/GSetup.py
Log:
In *.dist_template handling, make sure the target file keeps the mode of the
source file.


Modified: trunk/gnue-common/setup.py
===================================================================
--- trunk/gnue-common/setup.py  2007-06-06 08:39:24 UTC (rev 9672)
+++ trunk/gnue-common/setup.py  2007-06-06 08:46:11 UTC (rev 9673)
@@ -195,6 +195,7 @@
 import distutils.command.sdist
 import distutils.command.build
 import distutils.command.install
+import time
 from setupext import Data_Files, install_Data_Files
 
 # -----------------------------------------------------------------------------
@@ -320,6 +321,8 @@
     outfile = open(dst, 'w')
     outfile.write(content)
     outfile.close()
+    # Let destination file have the same mode than the source file.
+    os.chmod(dst, os.stat(src).st_mode)
 
 
 # =============================================================================

Modified: trunk/gnue-common/src/setup/GSetup.py
===================================================================
--- trunk/gnue-common/src/setup/GSetup.py       2007-06-06 08:39:24 UTC (rev 
9672)
+++ trunk/gnue-common/src/setup/GSetup.py       2007-06-06 08:46:11 UTC (rev 
9673)
@@ -133,6 +133,8 @@
     outfile = open(dst, 'w')
     outfile.write(content)
     outfile.close()
+    # Let destination file have the same mode than the source file.
+    os.chmod(dst, os.stat(src).st_mode)
 
 # =============================================================================
 # build: if done from SVN, build files to be installed first





reply via email to

[Prev in Thread] Current Thread [Next in Thread]