[Zope-Checkins] CVS: Zope/inst - build_pcgi.py:1.3.8.2 compilezpy.py:1.10.8.2 make_instance.py:1.3.6.2 walkandscrub.py:1.6.8.2

Casey Duncan casey@zope.com
Fri, 9 May 2003 15:35:02 -0400


Update of /cvs-repository/Zope/inst
In directory cvs.zope.org:/tmp/cvs-serv4095

Modified Files:
      Tag: Zope-2_6-branch
	build_pcgi.py compilezpy.py make_instance.py walkandscrub.py 
Log Message:
Backout previous changes made in error to inst/ files


=== Zope/inst/build_pcgi.py 1.3.8.1 => 1.3.8.2 ===
--- Zope/inst/build_pcgi.py:1.3.8.1	Fri May  9 15:05:54 2003
+++ Zope/inst/build_pcgi.py	Fri May  9 15:35:01 2003
@@ -1,86 +1,14 @@
 ##############################################################################
-# 
-# Zope Public License (ZPL) Version 1.0
-# -------------------------------------
-# 
-# Copyright (c) Digital Creations.  All rights reserved.
-# 
-# This license has been certified as Open Source(tm).
-# 
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions are
-# met:
-# 
-# 1. Redistributions in source code must retain the above copyright
-#    notice, this list of conditions, and the following disclaimer.
-# 
-# 2. Redistributions in binary form must reproduce the above copyright
-#    notice, this list of conditions, and the following disclaimer in
-#    the documentation and/or other materials provided with the
-#    distribution.
-# 
-# 3. Digital Creations requests that attribution be given to Zope
-#    in any manner possible. Zope includes a "Powered by Zope"
-#    button that is installed by default. While it is not a license
-#    violation to remove this button, it is requested that the
-#    attribution remain. A significant investment has been put
-#    into Zope, and this effort will continue if the Zope community
-#    continues to grow. This is one way to assure that growth.
-# 
-# 4. All advertising materials and documentation mentioning
-#    features derived from or use of this software must display
-#    the following acknowledgement:
-# 
-#      "This product includes software developed by Digital Creations
-#      for use in the Z Object Publishing Environment
-#      (http://www.zope.org/)."
-# 
-#    In the event that the product being advertised includes an
-#    intact Zope distribution (with copyright and license included)
-#    then this clause is waived.
-# 
-# 5. Names associated with Zope or Digital Creations must not be used to
-#    endorse or promote products derived from this software without
-#    prior written permission from Digital Creations.
-# 
-# 6. Modified redistributions of any form whatsoever must retain
-#    the following acknowledgment:
-# 
-#      "This product includes software developed by Digital Creations
-#      for use in the Z Object Publishing Environment
-#      (http://www.zope.org/)."
-# 
-#    Intact (re-)distributions of any official Zope release do not
-#    require an external acknowledgement.
-# 
-# 7. Modifications are encouraged but must be packaged separately as
-#    patches to official Zope releases.  Distributions that do not
-#    clearly separate the patches from the original work must be clearly
-#    labeled as unofficial distributions.  Modifications which do not
-#    carry the name Zope may be packaged in any form, as long as they
-#    conform to all of the clauses above.
-# 
-# 
-# Disclaimer
-# 
-#   THIS SOFTWARE IS PROVIDED BY DIGITAL CREATIONS ``AS IS'' AND ANY
-#   EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-#   IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
-#   PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL DIGITAL CREATIONS OR ITS
-#   CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-#   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-#   LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
-#   USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
-#   ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
-#   OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
-#   OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-#   SUCH DAMAGE.
-# 
-# 
-# This software consists of contributions made by Digital Creations and
-# many individuals on behalf of Digital Creations.  Specific
-# attributions are listed in the accompanying credits file.
-# 
+#
+# Copyright (c) 2001 Zope Corporation and Contributors. All Rights Reserved.
+#
+# This software is subject to the provisions of the Zope Public License,
+# Version 2.0 (ZPL).  A copy of the ZPL should accompany this distribution.
+# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
+# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
+# FOR A PARTICULAR PURPOSE
+#
 ##############################################################################
 """Build a PCGI
 
@@ -96,6 +24,3 @@
 do('./configure')
 do('make')
 os.chdir('..')
-print '-'*78
-print
-print 'Done! After installing your instance home, use "./zctl.py make_cgi".'


=== Zope/inst/compilezpy.py 1.10.8.1 => 1.10.8.2 ===
--- Zope/inst/compilezpy.py:1.10.8.1	Fri May  9 15:05:54 2003
+++ Zope/inst/compilezpy.py	Fri May  9 15:35:01 2003
@@ -1,137 +1,68 @@
 ##############################################################################
-# 
-# Zope Public License (ZPL) Version 1.0
-# -------------------------------------
-# 
-# Copyright (c) Digital Creations.  All rights reserved.
-# 
-# This license has been certified as Open Source(tm).
-# 
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions are
-# met:
-# 
-# 1. Redistributions in source code must retain the above copyright
-#    notice, this list of conditions, and the following disclaimer.
-# 
-# 2. Redistributions in binary form must reproduce the above copyright
-#    notice, this list of conditions, and the following disclaimer in
-#    the documentation and/or other materials provided with the
-#    distribution.
-# 
-# 3. Digital Creations requests that attribution be given to Zope
-#    in any manner possible. Zope includes a "Powered by Zope"
-#    button that is installed by default. While it is not a license
-#    violation to remove this button, it is requested that the
-#    attribution remain. A significant investment has been put
-#    into Zope, and this effort will continue if the Zope community
-#    continues to grow. This is one way to assure that growth.
-# 
-# 4. All advertising materials and documentation mentioning
-#    features derived from or use of this software must display
-#    the following acknowledgement:
-# 
-#      "This product includes software developed by Digital Creations
-#      for use in the Z Object Publishing Environment
-#      (http://www.zope.org/)."
-# 
-#    In the event that the product being advertised includes an
-#    intact Zope distribution (with copyright and license included)
-#    then this clause is waived.
-# 
-# 5. Names associated with Zope or Digital Creations must not be used to
-#    endorse or promote products derived from this software without
-#    prior written permission from Digital Creations.
-# 
-# 6. Modified redistributions of any form whatsoever must retain
-#    the following acknowledgment:
-# 
-#      "This product includes software developed by Digital Creations
-#      for use in the Z Object Publishing Environment
-#      (http://www.zope.org/)."
-# 
-#    Intact (re-)distributions of any official Zope release do not
-#    require an external acknowledgement.
-# 
-# 7. Modifications are encouraged but must be packaged separately as
-#    patches to official Zope releases.  Distributions that do not
-#    clearly separate the patches from the original work must be clearly
-#    labeled as unofficial distributions.  Modifications which do not
-#    carry the name Zope may be packaged in any form, as long as they
-#    conform to all of the clauses above.
-# 
-# 
-# Disclaimer
-# 
-#   THIS SOFTWARE IS PROVIDED BY DIGITAL CREATIONS ``AS IS'' AND ANY
-#   EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-#   IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
-#   PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL DIGITAL CREATIONS OR ITS
-#   CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-#   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-#   LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
-#   USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
-#   ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
-#   OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
-#   OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-#   SUCH DAMAGE.
-# 
-# 
-# This software consists of contributions made by Digital Creations and
-# many individuals on behalf of Digital Creations.  Specific
-# attributions are listed in the accompanying credits file.
-# 
+#
+# Copyright (c) 2001 Zope Corporation and Contributors. All Rights Reserved.
+#
+# This software is subject to the provisions of the Zope Public License,
+# Version 2.0 (ZPL).  A copy of the ZPL should accompany this distribution.
+# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
+# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
+# FOR A PARTICULAR PURPOSE
+#
 ##############################################################################
 
-import compileall, os, sys, stat, py_compile
+import compileall, os, sys
 
-print
-print '-'*78
-print 'Compiling python modules'
+class Shutup:
+    def write(*args): pass # :)
 
-# Copied from compileall.py, without 'print' statements.
-# Added check for '.no_pycompile'.
-def compile_dir(dir, maxlevels=10, ddir=None):
-    """Byte-compile all modules in the given directory tree."""
+class NoteErr:
+    wrote = 0
+    def write(self, *args):
+        self.wrote = 1
+        apply(stderr.write, args)
+
+def compile_non_test(dir):
+    """Byte-compile all modules except those in test directories."""
+    success = compileall.compile_dir(dir, maxlevels=0)
     try:
         names = os.listdir(dir)
     except os.error:
-        return
+        print "Can't list", dir
+        names = []
     names.sort()
-    if '.no_pycompile' in names:
-        return 1
-    success = 1
     for name in names:
         fullname = os.path.join(dir, name)
-        if ddir:
-            dfile = os.path.join(ddir, name)
-        else:
-            dfile = None
-        if os.path.isfile(fullname):
-            head, tail = name[:-3], name[-3:]
-            if tail == '.py':
-                cfile = fullname + (__debug__ and 'c' or 'o')
-                ftime = os.stat(fullname)[stat.ST_MTIME]
-                try: ctime = os.stat(cfile)[stat.ST_MTIME]
-                except os.error: ctime = 0
-                if (ctime > ftime): continue
-                try:
-                    py_compile.compile(fullname, None, dfile)
-                except KeyboardInterrupt:
-                    raise KeyboardInterrupt
-                except:
-                    print 'Compilation of "%s" failed.' % dfile
-                    success = 0
-        elif (maxlevels > 0 and 
-              name != os.curdir and name != os.pardir and 
-              os.path.isdir(fullname) and 
-              not os.path.islink(fullname)):
-            compile_dir(fullname, maxlevels - 1, dfile)
+        if (name != os.curdir and name != os.pardir and
+            os.path.isdir(fullname) and not os.path.islink(fullname) and
+            name != 'test' and name != 'tests' and name != 'skins'):
+            success = success and compile_non_test(fullname)
     return success
 
-if not compile_dir(os.getcwd()):
+print
+print '-'*78
+print 'Compiling python modules'
+stdout = sys.stdout
+stderr = sys.stderr
+try:
+    try:
+        success = 0
+        sys.stdout = Shutup()
+        sys.stderr = NoteErr()
+        success = compile_non_test(os.getcwd())
+    finally:
+        success = success and not sys.stderr.wrote
+        sys.stdout = stdout
+        sys.stderr = stderr
+except:
+    success = 0
+    import traceback
+    traceback.print_exc()
+
+if not success:
     print
     print '!' * 78
-    print 'There were errors during module compilation.'
+    print 'There were errors during Python module compilation.'
     print '!' * 78
     print
+    sys.exit(1)


=== Zope/inst/make_instance.py 1.3.6.1 => 1.3.6.2 ===
--- Zope/inst/make_instance.py:1.3.6.1	Fri May  9 15:05:54 2003
+++ Zope/inst/make_instance.py	Fri May  9 15:35:01 2003
@@ -1,86 +1,14 @@
 ##############################################################################
-# 
-# Zope Public License (ZPL) Version 1.0
-# -------------------------------------
-# 
-# Copyright (c) Digital Creations.  All rights reserved.
-# 
-# This license has been certified as Open Source(tm).
-# 
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions are
-# met:
-# 
-# 1. Redistributions in source code must retain the above copyright
-#    notice, this list of conditions, and the following disclaimer.
-# 
-# 2. Redistributions in binary form must reproduce the above copyright
-#    notice, this list of conditions, and the following disclaimer in
-#    the documentation and/or other materials provided with the
-#    distribution.
-# 
-# 3. Digital Creations requests that attribution be given to Zope
-#    in any manner possible. Zope includes a "Powered by Zope"
-#    button that is installed by default. While it is not a license
-#    violation to remove this button, it is requested that the
-#    attribution remain. A significant investment has been put
-#    into Zope, and this effort will continue if the Zope community
-#    continues to grow. This is one way to assure that growth.
-# 
-# 4. All advertising materials and documentation mentioning
-#    features derived from or use of this software must display
-#    the following acknowledgement:
-# 
-#      "This product includes software developed by Digital Creations
-#      for use in the Z Object Publishing Environment
-#      (http://www.zope.org/)."
-# 
-#    In the event that the product being advertised includes an
-#    intact Zope distribution (with copyright and license included)
-#    then this clause is waived.
-# 
-# 5. Names associated with Zope or Digital Creations must not be used to
-#    endorse or promote products derived from this software without
-#    prior written permission from Digital Creations.
-# 
-# 6. Modified redistributions of any form whatsoever must retain
-#    the following acknowledgment:
-# 
-#      "This product includes software developed by Digital Creations
-#      for use in the Z Object Publishing Environment
-#      (http://www.zope.org/)."
-# 
-#    Intact (re-)distributions of any official Zope release do not
-#    require an external acknowledgement.
-# 
-# 7. Modifications are encouraged but must be packaged separately as
-#    patches to official Zope releases.  Distributions that do not
-#    clearly separate the patches from the original work must be clearly
-#    labeled as unofficial distributions.  Modifications which do not
-#    carry the name Zope may be packaged in any form, as long as they
-#    conform to all of the clauses above.
-# 
-# 
-# Disclaimer
-# 
-#   THIS SOFTWARE IS PROVIDED BY DIGITAL CREATIONS ``AS IS'' AND ANY
-#   EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-#   IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
-#   PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL DIGITAL CREATIONS OR ITS
-#   CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-#   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-#   LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
-#   USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
-#   ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
-#   OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
-#   OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-#   SUCH DAMAGE.
-# 
-# 
-# This software consists of contributions made by Digital Creations and
-# many individuals on behalf of Digital Creations.  Specific
-# attributions are listed in the accompanying credits file.
-# 
+#
+# Copyright (c) 2001 Zope Corporation and Contributors. All Rights Reserved.
+#
+# This software is subject to the provisions of the Zope Public License,
+# Version 2.0 (ZPL).  A copy of the ZPL should accompany this distribution.
+# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
+# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
+# FOR A PARTICULAR PURPOSE
+#
 ##############################################################################
 """Make an INSTANCE_HOME."""
 
@@ -90,9 +18,7 @@
     home=os.path.abspath(os.path.split(me)[0])
     return os.path.split(home)[0]
 
-def main(me):
-    home=setup(me)
-
+def get_ih(home):
     print 'The instance home is the directory from which you will run Zope.'
     print 'Several instance homes, each with their own data and'
     print 'configuration, can share one copy of Zope.'
@@ -102,43 +28,91 @@
         if ih == '': ih = home
         else: ih = os.path.abspath(ih)
         if not os.path.exists(ih):
-            print '"%s" does not exist.' % ih
+            print '%s does not exist.' % `ih`
             make_ih = raw_input('Shall I create it [y]? ')
             if make_ih and make_ih[0] not in 'yY': continue
             try:
                 os.mkdir(ih, 0775)
-                break
             except:
-                print 'Unable to create "%s"' % ih
-            continue
+                print 'Unable to create %s' % `ih`
+            else:
+                print 'Created.'
+                return ih
         elif not os.path.isdir(ih):
-            print '"%s" is not a directory.' % ih
-            continue
-        break
+            print '%s is not a directory.' % `ih`
+        else:
+            print "%s exists, so I left it alone." % `ih`
+            return ih
+
+def main(me):
+    home=setup(me)
+    ih = get_ih(home)
 
+    # Make skeleton
     for dirname in ('Extensions', 'import', 'Products', 'var'):
         mode = (dirname == 'var') and 0711 or 0775
-        dirname = os.path.join(ih, dirname)
-        if not os.path.isdir(dirname):
-            os.mkdir(dirname, mode)
-    
+        dirpath = os.path.join(ih, dirname)
+        if not os.path.isdir(dirpath):
+            os.mkdir(dirpath, mode)
+            print 'Created %s directory.' % `dirname`
+
+    # Set up Data.fs
     db_path = os.path.join(ih, 'var', 'Data.fs')
     dd_path = os.path.join(home, 'var', 'Data.fs.in')
-    if not os.path.exists(db_path) and os.path.exists(dd_path):
-        print '-'*78
-        print 'Creating default database'
+    if os.path.exists(db_path):
+        print 'Database exists, so I left it alone.'
+    elif os.path.exists(dd_path):
         open(db_path,'wb').write(open(dd_path,'rb').read())
+        print 'Created default database'
 
-    zctl = os.path.join(home, 'inst', 'zctl.py.in')
-    zctl_txt = open(zctl).read() % (sys.executable, home)
-    zctl = os.path.join(ih, 'zctl.py')
-    open(zctl, 'w').write(zctl_txt)
-    os.chmod(zctl, 0700)
+    # Set up other *.in files
+    # Note: They will be %-substituted, so quote '%'s!
+    idata = {'python': sys.executable, 'software_home': home}
+    from glob import glob
+    for infile in glob(os.path.join(home, 'inst', '*.in')):
+        fn = os.path.split(infile)[1][:-3]
+        target = os.path.join(ih, fn)
+        if os.path.exists(target):
+            print '%s exists, so I left it alone' % fn
+        else:
+            txt = open(infile, 'rb').read() % idata
+            outfile = open(target, 'wb')
+            outfile.write(txt)
+            outfile.close()
+            os.chmod(target, 0700)
+            print 'Created %s' % fn
 
     print '-'*78
     print
-    print 'Done!'
+    print ('Now to create a starting user. Leave the username '
+           'blank if you want to skip this step.')
+    print
     sys.path.insert(0, home)
-    import zpasswd; zpasswd.choose_inituser(ih, '', '')
+    choose_inituser(ih)
+
+def choose_inituser(home):
+    ac_path=os.path.join(home, 'inituser')
+    if not os.path.exists(ac_path):
+        import getpass, zpasswd
+        print '-'*78
+        print 'Please choose a username and password.'
+        print 'This will create the initial user with which you manage Zope.'
+        username = raw_input("Username: ")
+        if username == '':
+            return
+
+        while 1:
+            pw = getpass.getpass("Password: ")
+            verify = getpass.getpass("Verify password: ")
+            if verify == pw:
+                break
+            else:
+                pw = verify = ''
+                print "Password mismatch, please try again..."
+        acfile=open(ac_path, 'w')
+        acfile.write('%s:%s' % (username, zpasswd.generate_passwd(pw, 'SHA')))
+        acfile.close()
+
+        import do; do.ch(ac_path, '', '', mode=0644)
 
 if __name__=='__main__': main(sys.argv[0])


=== Zope/inst/walkandscrub.py 1.6.8.1 => 1.6.8.2 ===
--- Zope/inst/walkandscrub.py:1.6.8.1	Fri May  9 15:05:54 2003
+++ Zope/inst/walkandscrub.py	Fri May  9 15:35:01 2003
@@ -1,86 +1,14 @@
 ##############################################################################
-# 
-# Zope Public License (ZPL) Version 1.0
-# -------------------------------------
-# 
-# Copyright (c) Digital Creations.  All rights reserved.
-# 
-# This license has been certified as Open Source(tm).
-# 
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions are
-# met:
-# 
-# 1. Redistributions in source code must retain the above copyright
-#    notice, this list of conditions, and the following disclaimer.
-# 
-# 2. Redistributions in binary form must reproduce the above copyright
-#    notice, this list of conditions, and the following disclaimer in
-#    the documentation and/or other materials provided with the
-#    distribution.
-# 
-# 3. Digital Creations requests that attribution be given to Zope
-#    in any manner possible. Zope includes a "Powered by Zope"
-#    button that is installed by default. While it is not a license
-#    violation to remove this button, it is requested that the
-#    attribution remain. A significant investment has been put
-#    into Zope, and this effort will continue if the Zope community
-#    continues to grow. This is one way to assure that growth.
-# 
-# 4. All advertising materials and documentation mentioning
-#    features derived from or use of this software must display
-#    the following acknowledgement:
-# 
-#      "This product includes software developed by Digital Creations
-#      for use in the Z Object Publishing Environment
-#      (http://www.zope.org/)."
-# 
-#    In the event that the product being advertised includes an
-#    intact Zope distribution (with copyright and license included)
-#    then this clause is waived.
-# 
-# 5. Names associated with Zope or Digital Creations must not be used to
-#    endorse or promote products derived from this software without
-#    prior written permission from Digital Creations.
-# 
-# 6. Modified redistributions of any form whatsoever must retain
-#    the following acknowledgment:
-# 
-#      "This product includes software developed by Digital Creations
-#      for use in the Z Object Publishing Environment
-#      (http://www.zope.org/)."
-# 
-#    Intact (re-)distributions of any official Zope release do not
-#    require an external acknowledgement.
-# 
-# 7. Modifications are encouraged but must be packaged separately as
-#    patches to official Zope releases.  Distributions that do not
-#    clearly separate the patches from the original work must be clearly
-#    labeled as unofficial distributions.  Modifications which do not
-#    carry the name Zope may be packaged in any form, as long as they
-#    conform to all of the clauses above.
-# 
-# 
-# Disclaimer
-# 
-#   THIS SOFTWARE IS PROVIDED BY DIGITAL CREATIONS ``AS IS'' AND ANY
-#   EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-#   IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
-#   PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL DIGITAL CREATIONS OR ITS
-#   CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-#   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-#   LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
-#   USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
-#   ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
-#   OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
-#   OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-#   SUCH DAMAGE.
-# 
-# 
-# This software consists of contributions made by Digital Creations and
-# many individuals on behalf of Digital Creations.  Specific
-# attributions are listed in the accompanying credits file.
-# 
+#
+# Copyright (c) 2001 Zope Corporation and Contributors. All Rights Reserved.
+#
+# This software is subject to the provisions of the Zope Public License,
+# Version 2.0 (ZPL).  A copy of the ZPL should accompany this distribution.
+# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
+# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
+# FOR A PARTICULAR PURPOSE
+#
 ##############################################################################
 
 import os, sys
@@ -112,9 +40,8 @@
         if ext == '.pyo' or ext == '.pyc':
             full = os.path.join(dirname, name)
             os.unlink(full)
-            filelist.remove(name)
             if DEBUG: print full
-            
+
 if __name__ == '__main__':
     DEBUG = 1
     walkandscrub(os.getcwd())