mailr7434 - in /tags/1.3.1: scons/distrib.py sconstruct


Others Months | Index by Date | Thread Index
>>   [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Header


Content

Posted by edward on September 29, 2008 - 00:42:
Author: bugman
Date: Mon Sep 29 00:41:59 2008
New Revision: 7434

URL: http://svn.gna.org/viewcvs/relax?rev=7434&view=rev
Log:
Redesigned the packaging of the distribution files.

The GPG key name is now passed into scons and the user manual is no longer 
compiled.


Modified:
    tags/1.3.1/scons/distrib.py
    tags/1.3.1/sconstruct

Modified: tags/1.3.1/scons/distrib.py
URL: 
http://svn.gna.org/viewcvs/relax/tags/1.3.1/scons/distrib.py?rev=7434&r1=7433&r2=7434&view=diff
==============================================================================
--- tags/1.3.1/scons/distrib.py (original)
+++ tags/1.3.1/scons/distrib.py Mon Sep 29 00:41:59 2008
@@ -24,6 +24,7 @@
 # Import statements.
 from os import getcwd, path, sep, system, walk
 from re import search
+import sys
 from tarfile import TarFile
 from zipfile import ZipFile
 
@@ -45,6 +46,12 @@
     if type_list[0] == 'ALL':
         type_list = ['zip', 'tar']
 
+    # GPG key.
+    key = env['GPG_KEY']
+    if key == None:
+        sys.stderr.write("The GPG key needs to be supplied on the command 
line as key=xxxxx, where xxxxx is the name of your key.\n\n")
+        return
+
     # Loop over the distribution files.
     for dist_type in type_list:
         # The file name.
@@ -57,7 +64,7 @@
         print "\n\nSigning the distribution package " + `file` + ".\n"
 
         # Run the 'gpg' command.
-        system("gpg --detach-sign --default-key relax " + path.pardir + 
path.sep + file)
+        system("gpg --detach-sign --default-key " + key + " " + path.pardir 
+ path.sep + file)
 
     # Final print out.
     print "\n\n\n"

Modified: tags/1.3.1/sconstruct
URL: 
http://svn.gna.org/viewcvs/relax/tags/1.3.1/sconstruct?rev=7434&r1=7433&r2=7434&view=diff
==============================================================================
--- tags/1.3.1/sconstruct (original)
+++ tags/1.3.1/sconstruct Mon Sep 29 00:41:59 2008
@@ -4,7 +4,7 @@
 
 
###############################################################################
 #                                                                            
 #
-# Copyright (C) 2006 Edward d'Auvergne                                       
 #
+# Copyright (C) 2006-2008 Edward d'Auvergne                                  
 #
 #                                                                            
 #
 # This file is part of the program relax.                                    
 #
 #                                                                            
 #
@@ -138,6 +138,12 @@
     DIST_TYPE = 'tar'
 
 
+# GPG key.
+##########
+
+GPG_KEY = ARGUMENTS.get('key')
+
+
 # Documentation.
 ################
 
@@ -205,7 +211,6 @@
         binary_dist_env.dummy(target='binary_dist', source=None)
         binary_dist_env.Depends('binary_dist', 'version_check')           # 
First check the program version number.
         binary_dist_env.Depends('binary_dist', self.relax_fit_object)     # 
Compile the C code.
-        binary_dist_env.Depends('binary_dist', 'user_manual_pdf')         # 
Compile the PDF version of the user manual.
         binary_dist_env.Depends('binary_dist', 'manual_clean_nodeps')     # 
Clean up the temporary manual files.
         binary_dist_env.Depends('binary_dist', 'clean')                   # 
Then clean up all other temporary files.
         binary_dist_env.Depends('binary_dist', 'package_bin')             # 
Package the binary distribution.
@@ -215,7 +220,6 @@
         source_dist_env = Environment(BUILDERS={'dummy' : 
Builder(action=self.dummy)})
         source_dist_env.dummy(target='source_dist', source=None)
         source_dist_env.Depends('source_dist', 'version_check')           # 
First check the program version number.
-        source_dist_env.Depends('source_dist', 'user_manual_pdf')         # 
Compile the PDF version of the user manual.
         source_dist_env.Depends('source_dist', 'manual_clean_nodeps')     # 
Clean up the temporary manual files.
         source_dist_env.Depends('source_dist', 'clean_all')               # 
Then clean up the sources.
         source_dist_env.Depends('source_dist', 'package_src')             # 
Package the source distribution.
@@ -238,14 +242,16 @@
         # Target for creating a GPG signature of the binary distribution 
file.
         gpg_bin_env = Environment(BUILDERS={'sign' : 
Builder(action=gpg_sign)},
                                   DIST_FILE=BIN_FILE,
-                                  DIST_TYPE=DIST_TYPE)
+                                  DIST_TYPE=DIST_TYPE,
+                                  GPG_KEY=GPG_KEY)
         gpg_bin_env.sign(target='gpg_bin', source=None)
         gpg_bin_env.Depends('gpg_bin', 'version_check')     # Check the 
program version number before signing.
 
         # Target for creating a GPG signature of the source distribution 
file.
         gpg_src_env = Environment(BUILDERS={'sign' : 
Builder(action=gpg_sign)},
                                   DIST_FILE=SRC_FILE,
-                                  DIST_TYPE='ALL')
+                                  DIST_TYPE='ALL',
+                                  GPG_KEY=GPG_KEY)
         gpg_src_env.sign(target='gpg_src', source=None)
         gpg_src_env.Depends('gpg_src', 'version_check')     # Check the 
program version number before signing.
 




Related Messages


Powered by MHonArc, Updated Mon Sep 29 01:20:04 2008