[Python-checkins] r47028 - sandbox/trunk/welease/README.txt sandbox/trunk/welease/sign-and-check.sh sandbox/trunk/welease/welease.py

anthony.baxter python-checkins at python.org
Mon Jun 19 14:08:25 CEST 2006


Author: anthony.baxter
Date: Mon Jun 19 14:08:25 2006
New Revision: 47028

Added:
   sandbox/trunk/welease/sign-and-check.sh   (contents, props changed)
Modified:
   sandbox/trunk/welease/README.txt
   sandbox/trunk/welease/welease.py
Log:
updates to the welease tool

Modified: sandbox/trunk/welease/README.txt
==============================================================================
--- sandbox/trunk/welease/README.txt	(original)
+++ sandbox/trunk/welease/README.txt	Mon Jun 19 14:08:25 2006
@@ -1,13 +1,14 @@
 This is a GUI for automation of Python releases. It's still very early days
-for it yet. See the comments at the top of welease.py for more. 
+for it yet. See the comments at the top of welease.py for more information.
 
 Don't even think about running this on something other than a linux box,
 I doubt it will work worth a damn (It needs GNU tar, and a sane operating
 system)
 
 Requirements:
-    python-gtk (unsure which version - something vaguely recent should be ok)
+    python-gtk 2.4 or later
     twisted 2.1 or later
     GNU tar (with bzip2 support)
+    gnome-gpg (to be replaced with pygpgme)
 
 -- Anthony

Added: sandbox/trunk/welease/sign-and-check.sh
==============================================================================
--- (empty file)
+++ sandbox/trunk/welease/sign-and-check.sh	Mon Jun 19 14:08:25 2006
@@ -0,0 +1,14 @@
+#!/bin/sh
+
+for filename in $*
+do
+    rm -f $filename.asc
+    gnome-gpg --sign --detach --armor $filename
+    if [ $? -ne 0 ]; then
+        echo "signing $filename failed!"
+    fi
+    gnome-gpg --verify-files $filename.asc
+    if [ $? -ne 0 ]; then
+        echo "signature for $filename failed!"
+    fi
+done

Modified: sandbox/trunk/welease/welease.py
==============================================================================
--- sandbox/trunk/welease/welease.py	(original)
+++ sandbox/trunk/welease/welease.py	Mon Jun 19 14:08:25 2006
@@ -41,7 +41,7 @@
 # Check the revision in the checkout is the same as repository HEAD (fatal)
 # Check Lib/idlelib/idlever.py (fatal)
 # Check Misc/NEWS and Lib/idlelib/NEWS.txt (fatal) 
-# Check product_codes in Tools/msi/msi.py (fatal)
+# Check product_codes in Tools/msi/uuids.py (fatal)
 # Check PCbuild/BUILDno.txt and PCbuild/pythoncore.vcproj [XXX] [2.4 only]
 # Check Doc/commontex/boilerplate.tex [XXX]
 # Check various release dates match [XXX]
@@ -57,7 +57,11 @@
 gtk2reactor.install()
 from twisted.internet import reactor, protocol, defer
 
-import os, sys, re
+import os, sys, re, time, calendar
+import gettext
+import compiler, compiler.ast
+import imp
+
 
 cfg = None
 
@@ -74,7 +78,6 @@
     warnDefer = None
 
     def __init__(self):
-        import gettext
         domain = gettext.textdomain()
         gtk.glade.textdomain(domain)
         self.xml = gtk.glade.XML("welease.glade", None, gettext.textdomain())
@@ -478,7 +481,6 @@
 
 
 def parseNewsFile(filename):
-    import time
     vers = releasedate = err = None
     for line in open(filename):
         line = line.strip()
@@ -505,10 +507,7 @@
 # There has _got_ to be a better way to handle this!
 # Best would be if msi.py was at least importable on non-Windows.
 # Or I can parse the file by hand - blech.
-import compiler, compiler.ast
-
 def extractDictFromAST(ast, dictname):
-    import compiler, compiler.ast
     products = None
     for item in ast.getChildren():
         if isinstance(item, compiler.ast.Assign):
@@ -536,7 +535,6 @@
         from uuids import product_codes
         unimportModules('uuids')
     else:
-        import compiler
         filename = os.path.join(dirname, 'msi.py')
         ast = compiler.parseFile(filename).getChildren()[1]
         product_codes = extractDictFromAST(ast, 'product_codes')
@@ -550,12 +548,11 @@
         code = maj + '150' # final, serial 0
     else:
         code = maj + levels[serial[0]] + serial[1:]
-    print code, product_codes
+    #print code, product_codes
     return product_codes.get(code)
 
 def main():
     global cfg
-    import imp
     cfgFileName = os.path.expanduser('~/.weleaserc')
 
     win = WeleaseWindow()


More information about the Python-checkins mailing list