[Checkins] SVN: zope.browser/trunk/ Update bootstrap and add missing svn:eol-style

Hanno Schlichting hannosch at hannosch.eu
Fri Apr 30 13:42:26 EDT 2010


Log message for revision 111669:
  Update bootstrap and add missing svn:eol-style
  

Changed:
  _U  zope.browser/trunk/CHANGES.txt
  _U  zope.browser/trunk/README.txt
  UU  zope.browser/trunk/bootstrap.py
  UU  zope.browser/trunk/buildout.cfg
  _U  zope.browser/trunk/setup.py
  UU  zope.browser/trunk/src/zope/__init__.py
  _U  zope.browser/trunk/src/zope/browser/README.txt
  UU  zope.browser/trunk/src/zope/browser/__init__.py
  UU  zope.browser/trunk/src/zope/browser/interfaces.py
  UU  zope.browser/trunk/src/zope/browser/tests.py

-=-

Property changes on: zope.browser/trunk/CHANGES.txt
___________________________________________________________________
Added: svn:eol-style
   + native


Property changes on: zope.browser/trunk/README.txt
___________________________________________________________________
Added: svn:eol-style
   + native

Modified: zope.browser/trunk/bootstrap.py
===================================================================
--- zope.browser/trunk/bootstrap.py	2010-04-30 17:38:33 UTC (rev 111668)
+++ zope.browser/trunk/bootstrap.py	2010-04-30 17:42:26 UTC (rev 111669)
@@ -1,52 +1,121 @@
-##############################################################################
-#
-# Copyright (c) 2006 Zope Corporation 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 73733 2007-03-27 13:29:11Z dobe $
-"""
-
-import os, shutil, sys, tempfile, urllib2
-
-tmpeggs = tempfile.mkdtemp()
-
-ez = {}
-exec urllib2.urlopen('http://peak.telecommunity.com/dist/ez_setup.py'
-                     ).read() in ez
-ez['use_setuptools'](to_dir=tmpeggs, download_delay=0)
-
-import pkg_resources
-
-cmd = 'from setuptools.command.easy_install import main; main()'
-if sys.platform == 'win32':
-    cmd = '"%s"' % cmd # work around spawn lamosity on windows
-
-ws = pkg_resources.working_set
-assert os.spawnle(
-    os.P_WAIT, sys.executable, sys.executable,
-    '-c', cmd, '-mqNxd', tmpeggs, 'zc.buildout',
-    dict(os.environ,
-         PYTHONPATH=
-         ws.find(pkg_resources.Requirement.parse('setuptools')).location
-         ),
-    ) == 0
-
-ws.add_entry(tmpeggs)
-ws.require('zc.buildout')
-import zc.buildout.buildout
-zc.buildout.buildout.main(sys.argv[1:] + ['bootstrap'])
-shutil.rmtree(tmpeggs)
+##############################################################################
+#
+# 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$
+"""
+
+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)


Property changes on: zope.browser/trunk/bootstrap.py
___________________________________________________________________
Added: svn:eol-style
   + native

Modified: zope.browser/trunk/buildout.cfg
===================================================================
--- zope.browser/trunk/buildout.cfg	2010-04-30 17:38:33 UTC (rev 111668)
+++ zope.browser/trunk/buildout.cfg	2010-04-30 17:42:26 UTC (rev 111669)
@@ -1,12 +1,12 @@
-[buildout]
-develop = . 
-parts = test py
-
-[test]
-recipe = zc.recipe.testrunner
-eggs = zope.browser [test]
-
-[py]
-recipe = zc.recipe.egg
-eggs = zope.browser
-interpreter = py
+[buildout]
+develop = . 
+parts = test py
+
+[test]
+recipe = zc.recipe.testrunner
+eggs = zope.browser [test]
+
+[py]
+recipe = zc.recipe.egg
+eggs = zope.browser
+interpreter = py


Property changes on: zope.browser/trunk/buildout.cfg
___________________________________________________________________
Added: svn:eol-style
   + native


Property changes on: zope.browser/trunk/setup.py
___________________________________________________________________
Added: svn:eol-style
   + native

Modified: zope.browser/trunk/src/zope/__init__.py
===================================================================
--- zope.browser/trunk/src/zope/__init__.py	2010-04-30 17:38:33 UTC (rev 111668)
+++ zope.browser/trunk/src/zope/__init__.py	2010-04-30 17:42:26 UTC (rev 111669)
@@ -1,7 +1,7 @@
-# this is a namespace package
-try:
-    import pkg_resources
-    pkg_resources.declare_namespace(__name__)
-except ImportError:
-    import pkgutil
-    __path__ = pkgutil.extend_path(__path__, __name__)
+# this is a namespace package
+try:
+    import pkg_resources
+    pkg_resources.declare_namespace(__name__)
+except ImportError:
+    import pkgutil
+    __path__ = pkgutil.extend_path(__path__, __name__)


Property changes on: zope.browser/trunk/src/zope/__init__.py
___________________________________________________________________
Added: svn:eol-style
   + native


Property changes on: zope.browser/trunk/src/zope/browser/README.txt
___________________________________________________________________
Added: svn:eol-style
   + native

Modified: zope.browser/trunk/src/zope/browser/__init__.py
===================================================================
--- zope.browser/trunk/src/zope/browser/__init__.py	2010-04-30 17:38:33 UTC (rev 111668)
+++ zope.browser/trunk/src/zope/browser/__init__.py	2010-04-30 17:42:26 UTC (rev 111669)
@@ -1 +1 @@
-# make a package
+# make a package


Property changes on: zope.browser/trunk/src/zope/browser/__init__.py
___________________________________________________________________
Added: svn:eol-style
   + native

Modified: zope.browser/trunk/src/zope/browser/interfaces.py
===================================================================
--- zope.browser/trunk/src/zope/browser/interfaces.py	2010-04-30 17:38:33 UTC (rev 111668)
+++ zope.browser/trunk/src/zope/browser/interfaces.py	2010-04-30 17:42:26 UTC (rev 111669)
@@ -1,109 +1,109 @@
-##############################################################################
-#
-# Copyright (c) 2004-2009 Zope Corporation 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.
-#
-##############################################################################
-"""Shared dependency less Zope3 brwoser components.
-"""
-__docformat__ = 'restructuredtext'
-
-from zope.interface import Attribute
-from zope.interface import Interface
-
-class IView(Interface):
-    """ Views are multi-adapters for context and request objects.
-    """
-    context = Attribute("The context object the view renders")
-    request = Attribute("The request object driving the view")
-
-class IBrowserView(IView):
-    """ Views which are specialized for requests from a browser
-
-    o Such views are distinct from those geerated via WebDAV, FTP, XML-RPC,
-      etc..
-    """
-
-class IAdding(IBrowserView):
-    """ Multi-adapter interface for views which add items to containers.
-
-    o The 'context' of the view must implement ``zope.container.IContainer``.
-    """
-    def add(content):
-        """Add content object to context.
-
-        Add using the name in `contentName`.
-
-        Return the added object in the context of its container.
-
-        If `contentName` is already used in container, raise
-        ``zope.container.interfaces.DuplicateIDError``.
-        """
-
-    contentName = Attribute(
-         """The content name, usually set by the Adder traverser.
-
-         If the content name hasn't been defined yet, returns ``None``.
-
-         Some creation views might use this to optionally display the
-         name on forms.
-         """
-         )
-
-    def nextURL():
-        """Return the URL that the creation view should redirect to.
-
-        This is called by the creation view after calling add.
-
-        It is the adder's responsibility, not the creation view's to
-        decide what page to display after content is added.
-        """
-
-    def nameAllowed():
-        """Return whether names can be input by the user.
-        """
-
-    def addingInfo():
-        """Return add menu data as a sequence of mappings.
-
-        Each mapping contains 'action', 'title', and possibly other keys.
-
-        The result is sorted by title.
-        """
-
-    def isSingleMenuItem():
-        """Return whether there is single menu item or not."""
-
-    def hasCustomAddView():
-        "This should be called only if there is `singleMenuItem` else return 0"
-
-
-class ITerms(Interface):
-    """ Adapter providing lookups for vocabulary terms.
-    """
-    def getTerm(value):
-        """Return an ITitledTokenizedTerm object for the given value
-
-        LookupError is raised if the value isn't in the source
-        """
-
-    def getValue(token):
-        """Return a value for a given identifier token
-
-        LookupError is raised if there isn't a value in the source.
-        """
-
-class ISystemErrorView(Interface):
-    """Error views that can classify their contexts as system errors
-    """
-
-    def isSystemError():
-        """Return a boolean indicating whether the error is a system errror
-        """
+##############################################################################
+#
+# Copyright (c) 2004-2009 Zope Corporation 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.
+#
+##############################################################################
+"""Shared dependency less Zope3 brwoser components.
+"""
+__docformat__ = 'restructuredtext'
+
+from zope.interface import Attribute
+from zope.interface import Interface
+
+class IView(Interface):
+    """ Views are multi-adapters for context and request objects.
+    """
+    context = Attribute("The context object the view renders")
+    request = Attribute("The request object driving the view")
+
+class IBrowserView(IView):
+    """ Views which are specialized for requests from a browser
+
+    o Such views are distinct from those geerated via WebDAV, FTP, XML-RPC,
+      etc..
+    """
+
+class IAdding(IBrowserView):
+    """ Multi-adapter interface for views which add items to containers.
+
+    o The 'context' of the view must implement ``zope.container.IContainer``.
+    """
+    def add(content):
+        """Add content object to context.
+
+        Add using the name in `contentName`.
+
+        Return the added object in the context of its container.
+
+        If `contentName` is already used in container, raise
+        ``zope.container.interfaces.DuplicateIDError``.
+        """
+
+    contentName = Attribute(
+         """The content name, usually set by the Adder traverser.
+
+         If the content name hasn't been defined yet, returns ``None``.
+
+         Some creation views might use this to optionally display the
+         name on forms.
+         """
+         )
+
+    def nextURL():
+        """Return the URL that the creation view should redirect to.
+
+        This is called by the creation view after calling add.
+
+        It is the adder's responsibility, not the creation view's to
+        decide what page to display after content is added.
+        """
+
+    def nameAllowed():
+        """Return whether names can be input by the user.
+        """
+
+    def addingInfo():
+        """Return add menu data as a sequence of mappings.
+
+        Each mapping contains 'action', 'title', and possibly other keys.
+
+        The result is sorted by title.
+        """
+
+    def isSingleMenuItem():
+        """Return whether there is single menu item or not."""
+
+    def hasCustomAddView():
+        "This should be called only if there is `singleMenuItem` else return 0"
+
+
+class ITerms(Interface):
+    """ Adapter providing lookups for vocabulary terms.
+    """
+    def getTerm(value):
+        """Return an ITitledTokenizedTerm object for the given value
+
+        LookupError is raised if the value isn't in the source
+        """
+
+    def getValue(token):
+        """Return a value for a given identifier token
+
+        LookupError is raised if there isn't a value in the source.
+        """
+
+class ISystemErrorView(Interface):
+    """Error views that can classify their contexts as system errors
+    """
+
+    def isSystemError():
+        """Return a boolean indicating whether the error is a system errror
+        """


Property changes on: zope.browser/trunk/src/zope/browser/interfaces.py
___________________________________________________________________
Added: svn:eol-style
   + native

Modified: zope.browser/trunk/src/zope/browser/tests.py
===================================================================
--- zope.browser/trunk/src/zope/browser/tests.py	2010-04-30 17:38:33 UTC (rev 111668)
+++ zope.browser/trunk/src/zope/browser/tests.py	2010-04-30 17:42:26 UTC (rev 111669)
@@ -1,32 +1,32 @@
-##############################################################################
-#
-# Copyright (c) 2007 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.
-#
-##############################################################################
-"""
-$Id:$
-"""
-__docformat__ = "reStructuredText"
-
-import unittest
-from zope.testing import doctest
-
-
-def test_suite():
-    return unittest.TestSuite((
-        doctest.DocFileSuite('README.txt',
-            optionflags=doctest.NORMALIZE_WHITESPACE|doctest.ELLIPSIS,
-            ),
-        ))
-
-
-if __name__ == '__main__':
-    unittest.main(defaultTest='test_suite')
+##############################################################################
+#
+# Copyright (c) 2007 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.
+#
+##############################################################################
+"""
+$Id:$
+"""
+__docformat__ = "reStructuredText"
+
+import unittest
+from zope.testing import doctest
+
+
+def test_suite():
+    return unittest.TestSuite((
+        doctest.DocFileSuite('README.txt',
+            optionflags=doctest.NORMALIZE_WHITESPACE|doctest.ELLIPSIS,
+            ),
+        ))
+
+
+if __name__ == '__main__':
+    unittest.main(defaultTest='test_suite')


Property changes on: zope.browser/trunk/src/zope/browser/tests.py
___________________________________________________________________
Added: svn:eol-style
   + native



More information about the checkins mailing list