[Zope3-checkins] CVS: Zope3 - spec.txt:1.2 setup.py:1.16 site.zcml:1.13 test.py:1.34 z3.py:1.12 stupid_build.py:NONE stupid_clean:NONE

Jim Fulton jim@zope.com
Wed, 25 Dec 2002 09:14:11 -0500


Update of /cvs-repository/Zope3
In directory cvs.zope.org:/tmp/cvs-serv15352

Modified Files:
	setup.py site.zcml test.py z3.py 
Added Files:
	spec.txt 
Removed Files:
	stupid_build.py stupid_clean 
Log Message:
Grand renaming:

- Renamed most files (especially python modules) to lower case.

- Moved views and interfaces into separate hierarchies within each
  project, where each top-level directory under the zope package
  is a separate project.

- Moved everything to src from lib/python.

  lib/python will eventually go away. I need access to the cvs
  repository to make this happen, however.

There are probably some bits that are broken. All tests pass
and zope runs, but I haven't tried everything. There are a number
of cleanups I'll work on tomorrow.



=== Zope3/spec.txt 1.1 => 1.2 === (1710/1810 lines abridged)
--- /dev/null	Wed Dec 25 09:14:10 2002
+++ Zope3/spec.txt	Wed Dec 25 09:12:08 2002
@@ -0,0 +1,1807 @@
+
+datetime/tests/__init__.py                                                                      datetime/tests/__init__.py
+datetime/tests/test_datetime.py                                                                 datetime/tests/test_datetime.py
+datetime/__init__.py                                                                            datetime/__init__.py
+datetime/_datetime.py                                                                           datetime/_datetime.py
+datetime/doc.txt                                                                                datetime/doc.txt
+logging/__init__.py                                                                             logging/__init__.py
+logging/config.py                                                                               logging/config.py
+logging/handlers.py                                                                             logging/handlers.py
+
+BDBStorage/_helper.c			    zodb/storage/_helper.c
+BDBStorage/tests/BerkeleyTestBase.py	    zodb/storage/tests/base.py
+BDBStorage/tests/ZODBTestBase.py	    zodb/storage/tests/base.py
+BDBStorage/tests/test_autopack.py	    zodb/storage/tests/test_autopack.py
+BDBStorage/tests/test_create.py		    zodb/storage/tests/test_create.py
+BDBStorage/tests/test_storage_api.py	    zodb/storage/tests/test_storage_api.py
+BDBStorage/tests/test_virgin.py		    zodb/storage/tests/test_virgin.py
+BDBStorage/tests/test_whitebox.py	    zodb/storage/tests/test_whitebox.py
+BDBStorage/tests/test_zodb_simple.py	    zodb/storage/tests/test_zodb_simple.py
+BDBStorage/tests/timeiter.py		    zodb/storage/tests/timeiter.py
+BDBStorage/tests/timepickles.py		    zodb/storage/tests/timepickles.py
+
+BDBStorage/BDBFullStorage.py	    zodb/storage/bdbfull.py
+BDBStorage/BDBMinimalStorage.py	    zodb/storage/bdbminimal.py
+BDBStorage/BerkeleyBase.py	    zodb/storage/base.py
+
+Persistence/Cache.py				persistence/cache.py
+Persistence/Class.py				zodb/code/class.py
+Persistence/Function.py				zodb/code/function.py
+Persistence/IPersistentModuleManager.py		zodb/code/interfaces.py
+Persistence/IPersistentModuleRegistry.py	zodb/code/interfaces.py
+Persistence/Module.py				zodb/code/module.py
+Persistence/PersistentDict.py			persistence/dict.py
+Persistence/PersistentList.py			persistence/list.py
+Persistence/__init__.py				persistence/__init__.py
+Persistence/_persistent.py			persistence/_persistent.py
+Persistence/cPersistence.c			persistence/persistence.c
+Persistence/cPersistence.h			persistence/persistence.h
+Persistence/cPersistenceAPI.h			persistence/persistenceAPI.h
+Persistence/interfaces.py			persistence/interfaces.py
+Persistence/patch.py				zodb/code/patch.py
+Persistence/BTrees/BTreeItemsTemplate.c		zodb/btrees/BTreeItemsTemplace.c
+Persistence/BTrees/BTreeModuleTemplate.c	zodb/btrees/BTreeModuleTemplate.c
+Persistence/BTrees/BTreeTemplate.c		zodb/btrees/BTreeTemplate.c
+Persistence/BTrees/BucketTemplate.c		zodb/btrees/BucketTemplate.c
+Persistence/BTrees/IIBTree.py			zodb/btrees/IIBTree.py
+Persistence/BTrees/IOBTree.py			zodb/btrees/IOBTree.py

[-=- -=- -=- 1710 lines omitted -=- -=- -=-]

+Zope/TextIndex/tests/indexhtml.py                                                               zope/textindex/tests/indexhtml.py
+Zope/TextIndex/tests/mailtest.py                                                                zope/textindex/tests/mailtest.py
+Zope/TextIndex/tests/mhindex.py                                                                 zope/textindex/tests/mhindex.py
+Zope/TextIndex/tests/queryhtml.py                                                               zope/textindex/tests/queryhtml.py
+Zope/TextIndex/tests/testIndex.py                                                               zope/textindex/tests/test_index.py
+Zope/TextIndex/tests/testLexicon.py                                                             zope/textindex/tests/test_lexicon.py
+Zope/TextIndex/tests/testNBest.py                                                               zope/textindex/tests/test_nbest.py
+Zope/TextIndex/tests/testPipelineFactory.py                                                     zope/textindex/tests/test_pipelinefactory.py
+Zope/TextIndex/tests/testQueryEngine.py                                                         zope/textindex/tests/test_queryengine.py
+Zope/TextIndex/tests/testQueryParser.py                                                         zope/textindex/tests/test_queryparser.py
+Zope/TextIndex/tests/testSetOps.py                                                              zope/textindex/tests/test_setops.py
+Zope/TextIndex/tests/testTextIndexWrapper.py                                                    zope/textindex/tests/test_textindexwrapper.py
+Zope/TextIndex/tests/wordstats.py                                                               zope/textindex/tests/wordstats.py
+Zope/TextIndex/BaseIndex.py                                                                     zope/textindex/baseindex.py
+Zope/TextIndex/CosineIndex.py                                                                   zope/textindex/cosineindex.py
+Zope/TextIndex/HTMLSplitter.py                                                                  zope/textindex/htmlsplitter.py
+Zope/TextIndex/IIndex.py                                                                        zope/textindex/iindex.py
+Zope/TextIndex/ILexicon.py                                                                      zope/textindex/ilexicon.py
+Zope/TextIndex/INBest.py                                                                        zope/textindex/inbest.py
+Zope/TextIndex/IPipelineElement.py                                                              zope/textindex/ipipelineelement.py
+Zope/TextIndex/IPipelineElementFactory.py                                                       zope/textindex/ipipelineelementfactory.py
+Zope/TextIndex/IQueryParseTree.py                                                               zope/textindex/iqueryparsetree.py
+Zope/TextIndex/IQueryParser.py                                                                  zope/textindex/iqueryparser.py
+Zope/TextIndex/ISplitter.py                                                                     zope/textindex/isplitter.py
+Zope/TextIndex/Lexicon.py                                                                       zope/textindex/lexicon.py
+Zope/TextIndex/NBest.py                                                                         zope/textindex/nbest.py
+Zope/TextIndex/OkapiIndex.py                                                                    zope/textindex/okapiindex.py
+Zope/TextIndex/ParseTree.py                                                                     zope/textindex/parsetree.py
+Zope/TextIndex/PipelineFactory.py                                                               zope/textindex/pipelinefactory.py
+Zope/TextIndex/QueryParser.py                                                                   zope/textindex/queryparser.py
+Zope/TextIndex/RiceCode.py                                                                      zope/textindex/ricecode.py
+Zope/TextIndex/SetOps.py                                                                        zope/textindex/setops.py
+Zope/TextIndex/StopDict.py                                                                      zope/textindex/stopdict.py
+Zope/TextIndex/TextIndexInterfaces.py                                                           zope/textindex/textindexinterfaces.py
+Zope/TextIndex/TextIndexWrapper.py                                                              zope/textindex/textindexwrapper.py
+Zope/TextIndex/WidCode.py                                                                       zope/textindex/widcode.py
+Zope/XMLPickle/tests/testXMLPickle.py                                                           zope/xmlpickle/tests/test_xmlpickle.py
+Zope/XMLPickle/XMLPickle.py                                                                     zope/xmlpickle/xmlpickle.py
+Zope/XMLPickle/__init__.py                                                                      zope/xmlpickle/__init__.py
+Zope/XMLPickle/ppml.py                                                                          zope/xmlpickle/ppml.py
+Zope/XMLPickle/xyap.py                                                                          zope/xmlpickle/xyap.py
+Zope/ZTUtils/Iterator.py                                                                        zope/pagetemplate/iterator.py
+Zope/ZTUtils/__init__.py                                                                        zope/pagetemplate/__init__.py
+
+
+
+
+
+
+


=== Zope3/setup.py 1.15 => 1.16 ===
--- Zope3/setup.py:1.15	Fri Dec 20 11:11:17 2002
+++ Zope3/setup.py	Wed Dec 25 09:12:08 2002
@@ -96,7 +96,7 @@
 
 # Create the finder instance, which will be used in lots of places.  `finder'
 # is the global we're most interested in.
-basedir = 'lib/python/'
+basedir = 'src/'
 finder = Finder(EXTS, basedir)
 os.path.walk(basedir, finder.visit, None)
 packages = finder.get_packages()
@@ -131,30 +131,32 @@
 
 # Set up dependencies for the BTrees package
 base_btrees_depends = [
-    "lib/python/Persistence/cPersistence.h",
-    "lib/python/Persistence/cPersistenceAPI.h",
-    "lib/python/Persistence/BTrees/BTreeItemsTemplate.c",
-    "lib/python/Persistence/BTrees/BTreeModuleTemplate.c",
-    "lib/python/Persistence/BTrees/BTreeTemplate.c",
-    "lib/python/Persistence/BTrees/BucketTemplate.c",
-    "lib/python/Persistence/BTrees/MergeTemplate.c",
-    "lib/python/Persistence/BTrees/SetOpTemplate.c",
-    "lib/python/Persistence/BTrees/SetTemplate.c",
-    "lib/python/Persistence/BTrees/TreeSetTemplate.c",
-    "lib/python/Persistence/BTrees/sorters.c",
+    "src/persistence/persistence.h",
+    "src/persistence/persistenceAPI.h",
+    "src/zodb/btrees/BTreeItemsTemplate.c",
+    "src/zodb/btrees/BTreeModuleTemplate.c",
+    "src/zodb/btrees/BTreeTemplate.c",
+    "src/zodb/btrees/BucketTemplate.c",
+    "src/zodb/btrees/MergeTemplate.c",
+    "src/zodb/btrees/SetOpTemplate.c",
+    "src/zodb/btrees/SetTemplate.c",
+    "src/zodb/btrees/TreeSetTemplate.c",
+    "src/zodb/btrees/sorters.c",
     ]
 
 _flavors = {"O": "object", "I": "int"}
 
-KEY_H = "lib/python/Persistence/BTrees/%skeymacros.h"
-VALUE_H = "lib/python/Persistence/BTrees/%svaluemacros.h"
+KEY_H = "src/zodb/btrees/%skeymacros.h"
+VALUE_H = "src/zodb/btrees/%svaluemacros.h"
+
+include_dirs = ['src']
 
 def BTreeExtension(flavor):
     key = flavor[0]
     value = flavor[1]
-    name = "Persistence.BTrees._%sBTree" % flavor
-    sources = ["lib/python/Persistence/BTrees/_%sBTree.c" % flavor]
-    kwargs = {"include_dirs": ["lib/python/Persistence"]}
+    name = "zodb.btrees._%sBTree" % flavor
+    sources = ["src/zodb/btrees/_%sBTree.c" % flavor]
+    kwargs = {"include_dirs": include_dirs}
     if flavor != "fs":
         kwargs["depends"] = (base_btrees_depends + [KEY_H % _flavors[key],
                                                     VALUE_H % _flavors[value]])
@@ -169,28 +171,28 @@
     BTreeExtension("OI"),
     BTreeExtension("II"),
     BTreeExtension("fs"),
-    Extension("Persistence.cPersistence",
-              ["lib/python/Persistence/cPersistence.c"],
-              depends = ["lib/python/Persistence/cPersistence.h",
-                         "lib/python/Persistence/cPersistenceAPI.h",]),
-    Extension("ZODB._TimeStamp", ["lib/python/ZODB/TimeStamp.c"]),
-    Extension("BDBStorage._helper", ["lib/python/BDBStorage/_helper.c"]),
-    Extension("Zope.ContextWrapper.wrapper",
-              ["lib/python/Zope/ContextWrapper/wrapper.c"],
-              include_dirs = ["lib/python"],
-              depends = ["lib/python/Zope/ContextWrapper/wrapper.h",
-                         "lib/python/Zope/Proxy/proxy.h"]),
-    Extension("Zope.Proxy.proxy", ["lib/python/Zope/Proxy/proxy.c"],
-              include_dirs = ["lib/python"],
-              depends = ["lib/python/Zope/Proxy/proxy.h"]),
-    Extension("Zope.Security._Proxy", ["lib/python/Zope/Security/_Proxy.c"],
-              include_dirs = ["lib/python"],
-              depends = ["lib/python/Zope/Proxy/proxy.h"]),
+    Extension("persistence._persistence",
+              ["src/persistence/persistence.c"],
+              depends = ["src/persistence/persistence.h",
+                         "src/persistence/persistenceAPI.h",]),
+    Extension("zodb._timestamp", ["src/zodb/_timestamp.c"]),
+    Extension("zodb.storage._helper", ["src/zodb/storage/_helper.c"]),
+    Extension("zope.proxy.context.wrapper",
+              ["src/zope/proxy/context/wrapper.c"],
+              include_dirs = include_dirs,
+              depends = ["src/zope/proxy/context/wrapper.h",
+                         "src/zope/proxy/proxy.h"]),
+    Extension("zope.proxy.proxy", ["src/zope/proxy/proxy.c"],
+              include_dirs = include_dirs,
+              depends = ["src/zope/proxy/proxy.h"]),
+    Extension("zope.security._proxy", ["src/zope/security/_proxy.c"],
+              include_dirs = include_dirs,
+              depends = ["src/zope/proxy/proxy.h"]),
     ]
 
 # On Window, there are more extensions that need to be built
 if sys.platform == "win32":
-    ext_modules += [Extension("ZODB.winlock", ["lib/python/ZODB/winlock.c"])]
+    ext_modules += [Extension("zodb.winlock", ["src/zodb/winlock.c"])]
 
 
 # We're using the module docstring as the distutils descriptions.
@@ -203,15 +205,15 @@
       url = "http://dev.zope.org/Wikis/DevSite/Projects/ComponentArchitecture",
       ext_modules = ext_modules,
       # This doesn't work right at all
-      headers = ["lib/python/Persistence/cPersistence.h",
-                 "lib/python/Persistence/cPersistenceAPI.h",
-                 "lib/python/Zope/Proxy/proxy.h",
-                 "lib/python/Zope/ContextWrapper/wrapper.h"],
+      headers = ["src/persistence/persistence.h",
+                 "src/persistence/persistenceAPI.h",
+                 "src/zope/proxy/proxy.h",
+                 "src/zope/proxy/context/wrapper.h"],
       license = "http://www.zope.org/Resources/ZPL",
       platforms = ["any"],
       description = doclines[0],
       long_description = "\n".join(doclines[2:]),
       packages = packages,
-      package_dir = {'': 'lib/python'},
+      package_dir = {'': 'src'},
       distclass = MyDistribution,
       )


=== Zope3/site.zcml 1.12 => 1.13 ===
--- Zope3/site.zcml:1.12	Sat Dec 21 10:48:20 2002
+++ Zope3/site.zcml	Wed Dec 25 09:12:08 2002
@@ -1,7 +1,7 @@
 <zopeConfigure xmlns='http://namespaces.zope.org/zope'>
 
-<include package="Zope.Configuration" file="metameta.zcml" />
-<include package="Zope.App" />
+<include package="zope.configuration" file="metameta.zcml" />
+<include package="zope.app" />
 
 <role id="Manager" title="Site Manager" />
 <role id="Member" title="Site Member" />
@@ -12,13 +12,13 @@
 <!-- Remove the following directive if you don't want public access -->
 <grant permission="Zope.View" role="Anonymous" />
 
-<grant permission="Zope.View"              role="Manager" />
-<grant permission="Zope.ManageContent"     role="Manager" />
-<grant permission="Zope.Security"          role="Manager" />
-<grant permission="Zope.ManageCode"        role="Manager" />
-<grant permission="Zope.ManageServices"    role="Manager" />
-<grant permission="Zope.ManageApplication" role="Manager" />
-<grant permission="Zope.ManageBindings"    role="Manager" />
+<grant permission="zope.View"              role="Manager" />
+<grant permission="zope.ManageContent"     role="Manager" />
+<grant permission="zope.Security"          role="Manager" />
+<grant permission="zope.ManageCode"        role="Manager" />
+<grant permission="zope.ManageServices"    role="Manager" />
+<grant permission="zope.ManageApplication" role="Manager" />
+<grant permission="zope.ManageBindings"    role="Manager" />
 
 <include file="products.zcml" />
 


=== Zope3/test.py 1.33 => 1.34 ===
--- Zope3/test.py:1.33	Fri Dec 20 17:20:43 2002
+++ Zope3/test.py	Wed Dec 25 09:12:09 2002
@@ -267,7 +267,7 @@
         # Calculate which directories we're going to add to sys.path, and cd
         # to the appropriate working directory
         if self.inplace:
-            self.libdir = os.path.join('lib', 'python')
+            self.libdir = 'src'
         else:
             self.libdir = 'lib.%s' % PLAT_SPEC
             os.chdir('build')
@@ -311,6 +311,7 @@
             if VERBOSE:
                 print 'skipping', pkg, 'because:', e
             return
+
         for file in files:
             if file.startswith('test') and os.path.splitext(file)[-1] == '.py':
                 path = os.path.join(dir, file)
@@ -345,6 +346,11 @@
     modname = finder.module_from_path(file)
     try:
         mod = package_import(modname)
+    except RuntimeError:
+        # test uses some optional software
+        if VERBOSE:
+            print 'Module with missing optional software skipped:', modname
+        return None
     except ImportError, err:
         # print traceback
         print "Error importing %s\n%s" % (modname, err)
@@ -436,10 +442,12 @@
     # Initialize the logging module.
     import logging.config
     logging.basicConfig()
-    logging.root.setLevel(logging.CRITICAL)
-    # If log.ini exists, use it
-    if os.path.exists(logini):
-        logging.config.fileConfig(logini)
+    level = os.getenv("LOGGING")
+    if level:
+        level = int(level)
+    else:
+        level = logging.CRITICAL
+    logging.root.setLevel(level)
 
     files = find_tests(module_filter)
     files.sort()


=== Zope3/z3.py 1.11 => 1.12 ===
--- Zope3/z3.py:1.11	Thu Dec 19 16:06:42 2002
+++ Zope3/z3.py	Wed Dec 25 09:12:09 2002
@@ -36,8 +36,8 @@
     # setting python paths
     program = argv[0]
     here = os.path.join(os.getcwd(), os.path.split(program)[0])
-    libpython = os.path.join(here, 'lib', 'python') 
-    sys.path = [libpython, here] + basepath
+    srcdir = os.path.abspath('src')
+    sys.path = [srcdir, here] + basepath
 
     # Initialize the logging module.
     import logging.config
@@ -49,9 +49,15 @@
 
     # temp hack
     dir = os.getcwd()
+    
+    # Copy products.zcml.in, if necessary
+    if (not os.path.exists('products.zcml')
+        and os.path.exists('products.zcml.in')
+        ):
+        open('products.zcml', 'w').write(open('products.zcml.in').read())
 
     # Do global software config
-    from Zope.App import config
+    from zope.app import config
     config('site.zcml')
     
     # Load server config
@@ -60,12 +66,12 @@
         ):
         open('zserver.zcml', 'w').write(open('zserver.zcml.in').read())
         
-    from Zope.Configuration.xmlconfig import XMLConfig
+    from zope.configuration.xmlconfig import XMLConfig
     XMLConfig(os.path.join(dir, 'zserver.zcml'))()
 
-    import ThreadedAsync
+    from zodb.zeo import threadedasync
     try:
-        ThreadedAsync.loop()
+        threadedasync.loop()
     except KeyboardInterrupt:
         # Exit without spewing an exception.
         pass
@@ -74,4 +80,3 @@
 
 if __name__ == '__main__':
     run()
-    

=== Removed File Zope3/stupid_build.py ===

=== Removed File Zope3/stupid_clean ===