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

[email protected]
Newsgroups gmane.comp.cms.gnue.cvs
Message-ID <[email protected]>
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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.