[Checkins] SVN: zope.configmachine/trunk/ separate from zope.configuration

Chris McDonough chrism at plope.com
Sun Aug 28 20:54:37 EDT 2011


Log message for revision 122699:
  separate from zope.configuration

Changed:
  _U  zope.configmachine/trunk/
  A   zope.configmachine/trunk/.bzrignore
  A   zope.configmachine/trunk/CHANGES.txt
  A   zope.configmachine/trunk/COPYRIGHT.txt
  A   zope.configmachine/trunk/LICENSE.txt
  A   zope.configmachine/trunk/README.txt
  A   zope.configmachine/trunk/bootstrap.py
  A   zope.configmachine/trunk/buildout.cfg
  A   zope.configmachine/trunk/setup.py
  A   zope.configmachine/trunk/src/
  A   zope.configmachine/trunk/src/zope/
  A   zope.configmachine/trunk/src/zope/__init__.py
  A   zope.configmachine/trunk/src/zope/configmachine/
  U   zope.configmachine/trunk/src/zope/configmachine/exceptions.py
  U   zope.configmachine/trunk/src/zope/configmachine/tests/test_config.py

-=-

Property changes on: zope.configmachine/trunk
___________________________________________________________________
Added: svn:ignore
   + bin
eggs
build
dist
lib
setup.cfg
.installed.cfg
parts
develop-eggs



Added: zope.configmachine/trunk/.bzrignore
===================================================================
--- zope.configmachine/trunk/.bzrignore	                        (rev 0)
+++ zope.configmachine/trunk/.bzrignore	2011-08-29 00:54:36 UTC (rev 122699)
@@ -0,0 +1,6 @@
+./.installed.cfg
+./bin
+./develop-eggs
+./eggs
+./parts
+*.egg-info

Added: zope.configmachine/trunk/CHANGES.txt
===================================================================
--- zope.configmachine/trunk/CHANGES.txt	                        (rev 0)
+++ zope.configmachine/trunk/CHANGES.txt	2011-08-29 00:54:36 UTC (rev 122699)
@@ -0,0 +1,8 @@
+=======
+Changes
+=======
+
+Next release
+------------
+
+- Initial release.

Added: zope.configmachine/trunk/COPYRIGHT.txt
===================================================================
--- zope.configmachine/trunk/COPYRIGHT.txt	                        (rev 0)
+++ zope.configmachine/trunk/COPYRIGHT.txt	2011-08-29 00:54:36 UTC (rev 122699)
@@ -0,0 +1 @@
+Zope Foundation and Contributors
\ No newline at end of file

Added: zope.configmachine/trunk/LICENSE.txt
===================================================================
--- zope.configmachine/trunk/LICENSE.txt	                        (rev 0)
+++ zope.configmachine/trunk/LICENSE.txt	2011-08-29 00:54:36 UTC (rev 122699)
@@ -0,0 +1,44 @@
+Zope Public License (ZPL) Version 2.1
+
+A copyright notice accompanies this license document that identifies the
+copyright holders.
+
+This license has been certified as open source. It has also been designated as
+GPL compatible by the Free Software Foundation (FSF).
+
+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 accompanying copyright
+notice, this list of conditions, and the following disclaimer.
+
+2. Redistributions in binary form must reproduce the accompanying copyright
+notice, this list of conditions, and the following disclaimer in the
+documentation and/or other materials provided with the distribution.
+
+3. Names of the copyright holders must not be used to endorse or promote
+products derived from this software without prior written permission from the
+copyright holders.
+
+4. The right to distribute this software or to use it for any purpose does not
+give you the right to use Servicemarks (sm) or Trademarks (tm) of the
+copyright
+holders. Use of them is covered by separate agreement with the copyright
+holders.
+
+5. If any files are modified, you must cause the modified files to carry
+prominent notices stating that you changed the files and the date of any
+change.
+
+Disclaimer
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``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 THE COPYRIGHT HOLDERS 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.

Added: zope.configmachine/trunk/README.txt
===================================================================
--- zope.configmachine/trunk/README.txt	                        (rev 0)
+++ zope.configmachine/trunk/README.txt	2011-08-29 00:54:36 UTC (rev 122699)
@@ -0,0 +1,9 @@
+zope.configmachine
+==================
+
+Overview
+--------
+
+This is a support package used by zope.configuration and Pyramid.  It is the
+non-ZCML-related portions of the zope.configuration machinery.
+

Added: zope.configmachine/trunk/bootstrap.py
===================================================================
--- zope.configmachine/trunk/bootstrap.py	                        (rev 0)
+++ zope.configmachine/trunk/bootstrap.py	2011-08-29 00:54:36 UTC (rev 122699)
@@ -0,0 +1,121 @@
+##############################################################################
+#
+# Copyright (c) 2006 Zope Foundation and Contributors.
+# All Rights Reserved.
+#
+# This software is subject to the provisions of the Zope Public License,
+# Version 2.1 (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.
+#
+##############################################################################
+"""Bootstrap a buildout-based project
+
+Simply run this script in a directory containing a buildout.cfg.
+The script accepts buildout command-line options, so you can
+use the -c option to specify an alternate configuration file.
+
+$Id: bootstrap.py 111664 2010-04-30 17:35:35Z hannosch $
+"""
+
+import os, shutil, sys, tempfile, urllib2
+from optparse import OptionParser
+
+tmpeggs = tempfile.mkdtemp()
+
+is_jython = sys.platform.startswith('java')
+
+# parsing arguments
+parser = OptionParser()
+parser.add_option("-v", "--version", dest="version",
+                          help="use a specific zc.buildout version")
+parser.add_option("-d", "--distribute",
+                   action="store_true", dest="distribute", default=False,
+                   help="Use Disribute rather than Setuptools.")
+
+parser.add_option("-c", None, action="store", dest="config_file",
+                   help=("Specify the path to the buildout configuration "
+                         "file to be used."))
+
+options, args = parser.parse_args()
+
+# if -c was provided, we push it back into args for buildout' main function
+if options.config_file is not None:
+    args += ['-c', options.config_file]
+
+if options.version is not None:
+    VERSION = '==%s' % options.version
+else:
+    VERSION = ''
+
+USE_DISTRIBUTE = options.distribute
+args = args + ['bootstrap']
+
+to_reload = False
+try:
+    import pkg_resources
+    if not hasattr(pkg_resources, '_distribute'):
+        to_reload = True
+        raise ImportError
+except ImportError:
+    ez = {}
+    if USE_DISTRIBUTE:
+        exec urllib2.urlopen('http://python-distribute.org/distribute_setup.py'
+                         ).read() in ez
+        ez['use_setuptools'](to_dir=tmpeggs, download_delay=0, no_fake=True)
+    else:
+        exec urllib2.urlopen('http://peak.telecommunity.com/dist/ez_setup.py'
+                             ).read() in ez
+        ez['use_setuptools'](to_dir=tmpeggs, download_delay=0)
+
+    if to_reload:
+        reload(pkg_resources)
+    else:
+        import pkg_resources
+
+if sys.platform == 'win32':
+    def quote(c):
+        if ' ' in c:
+            return '"%s"' % c # work around spawn lamosity on windows
+        else:
+            return c
+else:
+    def quote (c):
+        return c
+
+cmd = 'from setuptools.command.easy_install import main; main()'
+ws  = pkg_resources.working_set
+
+if USE_DISTRIBUTE:
+    requirement = 'distribute'
+else:
+    requirement = 'setuptools'
+
+if is_jython:
+    import subprocess
+
+    assert subprocess.Popen([sys.executable] + ['-c', quote(cmd), '-mqNxd',
+           quote(tmpeggs), 'zc.buildout' + VERSION],
+           env=dict(os.environ,
+               PYTHONPATH=
+               ws.find(pkg_resources.Requirement.parse(requirement)).location
+               ),
+           ).wait() == 0
+
+else:
+    assert os.spawnle(
+        os.P_WAIT, sys.executable, quote (sys.executable),
+        '-c', quote (cmd), '-mqNxd', quote (tmpeggs), 'zc.buildout' + VERSION,
+        dict(os.environ,
+            PYTHONPATH=
+            ws.find(pkg_resources.Requirement.parse(requirement)).location
+            ),
+        ) == 0
+
+ws.add_entry(tmpeggs)
+ws.require('zc.buildout' + VERSION)
+import zc.buildout.buildout
+zc.buildout.buildout.main(args)
+shutil.rmtree(tmpeggs)

Added: zope.configmachine/trunk/buildout.cfg
===================================================================
--- zope.configmachine/trunk/buildout.cfg	                        (rev 0)
+++ zope.configmachine/trunk/buildout.cfg	2011-08-29 00:54:36 UTC (rev 122699)
@@ -0,0 +1,12 @@
+[buildout]
+develop = .
+parts = test python
+
+[test]
+recipe = zc.recipe.testrunner
+eggs = zope.configmachine [test]
+
+[python]
+recipe = zc.recipe.egg
+eggs = zope.configmachine
+interpreter = python

Added: zope.configmachine/trunk/setup.py
===================================================================
--- zope.configmachine/trunk/setup.py	                        (rev 0)
+++ zope.configmachine/trunk/setup.py	2011-08-29 00:54:36 UTC (rev 122699)
@@ -0,0 +1,95 @@
+##############################################################################
+#
+# Copyright (c) 2011 Zope Foundation and Contributors.
+# All Rights Reserved.
+#
+# This software is subject to the provisions of the Zope Public License,
+# Version 2.1 (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.
+#
+##############################################################################
+# This package is developed by the Zope Toolkit project, documented here:
+# http://docs.zope.org/zopetoolkit
+# When developing and releasing this package, please follow the documented
+# Zope Toolkit policies as described by this documentation.
+##############################################################################
+
+import os
+from setuptools import setup, find_packages
+
+def read(*rnames):
+    return open(os.path.join(os.path.dirname(__file__), *rnames)).read()
+
+def _modname(path, base, name=''):
+    if path == base:
+        return name
+    dirname, basename = os.path.split(path)
+    return _modname(dirname, base, basename + '.' + name)
+
+def alltests():
+    import logging
+    import pkg_resources
+    import unittest
+
+    class NullHandler(logging.Handler):
+        level = 50
+        
+        def emit(self, record):
+            pass
+
+    logging.getLogger().addHandler(NullHandler())
+
+    suite = unittest.TestSuite()
+    base = pkg_resources.working_set.find(
+        pkg_resources.Requirement.parse('zope.configmachine')).location
+    for dirpath, dirnames, filenames in os.walk(base):
+        if os.path.basename(dirpath) == 'tests':
+            for filename in filenames:
+                if ( filename.endswith('.py') and
+                     filename.startswith('test') ):
+                    mod = __import__(
+                        _modname(dirpath, base,
+                                 os.path.splitext(filename)[0]),
+                        {}, {}, ['*'])
+                    suite.addTest(mod.test_suite())
+    return suite
+
+setup(name='zope.configmachine',
+      version = '0.0',
+      author='Zope Foundation and Contributors',
+      author_email='zope-dev at zope.org',
+      description='Non-ZCML portion of Zope Configuration',
+      long_description=(
+          read('README.txt')
+          + '\n\n' +
+          read('CHANGES.txt')
+          ),
+      keywords = "zope configuration configmachine",
+      classifiers = [
+          'Development Status :: 5 - Production/Stable',
+          'Environment :: Web Environment',
+          'Intended Audience :: Developers',
+          'License :: OSI Approved :: Zope Public License',
+          'Programming Language :: Python',
+          'Natural Language :: English',
+          'Operating System :: OS Independent',
+          'Topic :: Internet :: WWW/HTTP',
+          'Framework :: Zope3'],
+      url='http://pypi.python.org/pypi/zope.configmachine',
+      license='ZPL 2.1',
+      packages=find_packages('src'),
+      package_dir={'': 'src'},
+      namespace_packages=['zope'],
+      extras_require=dict(
+          test=['zope.testing']),
+      install_requires=['zope.interface',
+                        'setuptools',
+                       ],
+      include_package_data=True,
+      zip_safe=False,
+      tests_require = 'zope.testing',
+      test_suite='__main__.alltests',
+      )

Added: zope.configmachine/trunk/src/zope/__init__.py
===================================================================
--- zope.configmachine/trunk/src/zope/__init__.py	                        (rev 0)
+++ zope.configmachine/trunk/src/zope/__init__.py	2011-08-29 00:54:36 UTC (rev 122699)
@@ -0,0 +1 @@
+__import__('pkg_resources').declare_namespace(__name__)

Modified: zope.configmachine/trunk/src/zope/configmachine/exceptions.py
===================================================================
--- zope.configuration/branches/chrism-configmachine/src/zope/configmachine/exceptions.py	2011-08-29 00:28:53 UTC (rev 122698)
+++ zope.configmachine/trunk/src/zope/configmachine/exceptions.py	2011-08-29 00:54:36 UTC (rev 122699)
@@ -1,6 +1,6 @@
 ##############################################################################
 #
-# Copyright (c) 2002 Zope Foundation and Contributors.
+# Copyright (c) 2011 Zope Foundation and Contributors.
 # All Rights Reserved.
 #
 # This software is subject to the provisions of the Zope Public License,

Modified: zope.configmachine/trunk/src/zope/configmachine/tests/test_config.py
===================================================================
--- zope.configuration/branches/chrism-configmachine/src/zope/configmachine/tests/test_config.py	2011-08-29 00:28:53 UTC (rev 122698)
+++ zope.configmachine/trunk/src/zope/configmachine/tests/test_config.py	2011-08-29 00:54:36 UTC (rev 122699)
@@ -1,6 +1,6 @@
 ##############################################################################
 #
-# Copyright (c) 2003 Zope Foundation and Contributors.
+# Copyright (c) 2011 Zope Foundation and Contributors.
 # All Rights Reserved.
 #
 # This software is subject to the provisions of the Zope Public License,



More information about the checkins mailing list