[Checkins] SVN: zc.buildout/branches/tlotze-download-api/ merged trunk

Thomas Lotze tl at gocept.com
Mon Jun 22 06:04:58 EDT 2009


Log message for revision 101215:
  merged trunk

Changed:
  U   zc.buildout/branches/tlotze-download-api/CHANGES.txt
  U   zc.buildout/branches/tlotze-download-api/setup.py
  U   zc.buildout/branches/tlotze-download-api/src/zc/buildout/bootstrap.txt
  U   zc.buildout/branches/tlotze-download-api/src/zc/buildout/buildout.py
  U   zc.buildout/branches/tlotze-download-api/src/zc/buildout/buildout.txt
  U   zc.buildout/branches/tlotze-download-api/src/zc/buildout/easy_install.py
  U   zc.buildout/branches/tlotze-download-api/src/zc/buildout/easy_install.txt
  U   zc.buildout/branches/tlotze-download-api/src/zc/buildout/testing.py
  U   zc.buildout/branches/tlotze-download-api/src/zc/buildout/tests.py
  U   zc.buildout/branches/tlotze-download-api/zc.recipe.egg_/src/zc/recipe/egg/tests.py

-=-
Modified: zc.buildout/branches/tlotze-download-api/CHANGES.txt
===================================================================
--- zc.buildout/branches/tlotze-download-api/CHANGES.txt	2009-06-22 09:33:30 UTC (rev 101214)
+++ zc.buildout/branches/tlotze-download-api/CHANGES.txt	2009-06-22 10:04:58 UTC (rev 101215)
@@ -4,6 +4,15 @@
 1.3.0 (unreleased)
 ==================
 
+- Added a download API that handles the download cache, offline mode etc and
+  is meant to be reused by recipes.
+
+- Used the download API to allow caching of base configurations (specified by
+  the buildout section's 'extends' option).
+
+1.2.2 (2009-06-19)
+==================
+
 - Better Windows compatibility in test infrastructure.
 
 - Now the bootstrap.py has an optional --version argument,
@@ -14,11 +23,9 @@
   tear down as it might disturb other packages reusing buildout's
   testing infrastructure.
 
-- Added a download API that handles the download cache, offline mode etc and
-  is meant to be reused by recipes.
+- fixed usage of 'relative_paths' keyword parameter on Windows
 
-- Used the download API to allow caching of base configurations (specified by
-  the buildout section's 'extends' option).
+- Added an unload entry point for extensions.
 
 1.2.1 (2009-03-18)
 ==================

Modified: zc.buildout/branches/tlotze-download-api/setup.py
===================================================================
--- zc.buildout/branches/tlotze-download-api/setup.py	2009-06-22 09:33:30 UTC (rev 101214)
+++ zc.buildout/branches/tlotze-download-api/setup.py	2009-06-22 10:04:58 UTC (rev 101215)
@@ -1,6 +1,6 @@
 ##############################################################################
 #
-# Copyright (c) 2006 Zope Corporation and Contributors.
+# Copyright (c) 2006-2009 Zope Corporation and Contributors.
 # All Rights Reserved.
 #
 # This software is subject to the provisions of the Zope Public License,
@@ -12,7 +12,7 @@
 #
 ##############################################################################
 
-version = "1.2.2dev"
+version = "1.3.0dev"
 
 import os
 from setuptools import setup, find_packages

Modified: zc.buildout/branches/tlotze-download-api/src/zc/buildout/bootstrap.txt
===================================================================
--- zc.buildout/branches/tlotze-download-api/src/zc/buildout/bootstrap.txt	2009-06-22 09:33:30 UTC (rev 101214)
+++ zc.buildout/branches/tlotze-download-api/src/zc/buildout/bootstrap.txt	2009-06-22 10:04:58 UTC (rev 101215)
@@ -59,12 +59,7 @@
     X
     No local packages or download links found for zc.buildout==UNKNOWN
     error: Could not find suitable distribution for Requirement.parse('zc.buildout==UNKNOWN')
-    Traceback (most recent call last):
-      File "bootstrap.py", line 78, in <module>
-        ) == 0
-    AssertionError
-    <BLANKLINE>
-    X
+    ...
 
 Now let's try with `1.1.2`, which happens to exist::
 

Modified: zc.buildout/branches/tlotze-download-api/src/zc/buildout/buildout.py
===================================================================
--- zc.buildout/branches/tlotze-download-api/src/zc/buildout/buildout.py	2009-06-22 09:33:30 UTC (rev 101214)
+++ zc.buildout/branches/tlotze-download-api/src/zc/buildout/buildout.py	2009-06-22 10:04:58 UTC (rev 101215)
@@ -83,7 +83,7 @@
                  user_defaults=True, windows_restart=False, command=None):
 
         __doing__ = 'Initializing.'
-        
+
         self.__windows_restart = windows_restart
 
         # default options
@@ -149,7 +149,7 @@
         # because while parsing options those attributes might be
         # used already (Gottfried Ganssauge)
         buildout_section = data.get('buildout')
-            
+
         # Try to make sure we have absolute paths for standard
         # directories. We do this before doing substitutions, in case
         # a one of these gets read by another section.  If any
@@ -166,13 +166,13 @@
 
         allow_hosts = buildout_section and buildout_section.get(
              'allow-hosts', '*').split('\n')
-        self._allow_hosts = tuple([host.strip() for host in allow_hosts 
+        self._allow_hosts = tuple([host.strip() for host in allow_hosts
                                    if host.strip() != ''])
 
         self._logger = logging.getLogger('zc.buildout')
         self.offline = False
         self.newest = True
-        
+
         ##################################################################
         ## WARNING!!!
         ## ALL ATTRIBUTES MUST HAVE REASONABLE DEFAULTS AT THIS POINT
@@ -184,9 +184,9 @@
         # now reinitialize
         links = options.get('find-links', '')
         self._links = links and links.split() or ()
-        
+
         allow_hosts = options.get('allow-hosts', '*').split('\n')
-        self._allow_hosts = tuple([host.strip() for host in allow_hosts 
+        self._allow_hosts = tuple([host.strip() for host in allow_hosts
                                    if host.strip() != ''])
 
         self._buildout_dir = options['directory']
@@ -227,7 +227,7 @@
             self._error('Invalid value for prefer-final option: %s',
                         prefer_final)
         zc.buildout.easy_install.prefer_final(prefer_final=='true')
-        
+
         use_dependency_links = options.get('use-dependency-links', 'true')
         if use_dependency_links not in ('true', 'false'):
             self._error('Invalid value for use-dependency-links option: %s',
@@ -254,7 +254,7 @@
             download_cache = os.path.join(download_cache, 'dist')
             if not os.path.isdir(download_cache):
                 os.mkdir(download_cache)
-                
+
             zc.buildout.easy_install.download_cache(download_cache)
 
         install_from_cache = options.get('install-from-cache')
@@ -351,7 +351,7 @@
         installed_develop_eggs = self._develop()
         installed_part_options['buildout']['installed_develop_eggs'
                                            ] = installed_develop_eggs
-        
+
         if installed_exists:
             self._update_installed(
                 installed_develop_eggs=installed_develop_eggs)
@@ -361,7 +361,7 @@
         conf_parts = conf_parts and conf_parts.split() or []
         installed_parts = installed_part_options['buildout']['parts']
         installed_parts = installed_parts and installed_parts.split() or []
-        
+
         if install_args:
             install_parts = install_args
             uninstall_missing = False
@@ -377,11 +377,11 @@
         if self._log_level < logging.DEBUG:
             sections = list(self)
             sections.sort()
-            print    
+            print
             print 'Configuration data:'
             for section in self._data:
                 _save_options(section, self[section], sys.stdout)
-            print    
+            print
 
 
         # compute new part recipe signatures
@@ -509,7 +509,7 @@
 
             if need_to_save_installed:
                 installed_part_options['buildout']['parts'] = (
-                    ' '.join(installed_parts))            
+                    ' '.join(installed_parts))
                 self._save_installed_options(installed_part_options)
                 installed_exists = True
             else:
@@ -522,6 +522,8 @@
         elif (not installed_parts) and installed_exists:
             os.remove(self['buildout']['installed'])
 
+        self._unload_extensions()
+
     def _update_installed(self, **buildout_options):
         installed = self['buildout']['installed']
         f = open(installed, 'a')
@@ -549,7 +551,6 @@
         self._uninstall(
             installed_part_options[part]['__buildout_installed__'])
 
-
     def _setup_directories(self):
         __doing__ = 'Setting up buildout directories'
 
@@ -580,7 +581,8 @@
                     setup = self._buildout_path(setup)
                     files = glob.glob(setup)
                     if not files:
-                        self._logger.warn("Couldn't develop %r (not found)", setup)
+                        self._logger.warn("Couldn't develop %r (not found)",
+                                          setup)
                     else:
                         files.sort()
                     for setup in files:
@@ -597,7 +599,7 @@
                      if f not in old_files
                      ]))
                 raise
-                     
+
             else:
                 self._sanity_check_develop_eggs_files(dest, old_files)
                 return '\n'.join([os.path.join(dest, f)
@@ -644,7 +646,7 @@
                             value = value.replace(k, v)
                     options[option] = value
                 result[section] = Options(self, section, options)
-                        
+
             return result, True
         else:
             return ({'buildout': Options(self, 'buildout', {'parts': ''})},
@@ -672,8 +674,8 @@
                         # Sigh. This is the exectable used to run the buildout
                         # and, of course, it's in use. Leave it.
                         ):
-                        raise                    
-                
+                        raise
+
     def _install(self, part):
         options = self[part]
         recipe, entry = _recipe(options)
@@ -717,7 +719,7 @@
             buildout_handler.setFormatter(logging.Formatter('%(message)s'))
             self._logger.propagate = False
             self._logger.addHandler(buildout_handler)
-            
+
         handler.setFormatter(logging.Formatter(log_format))
         root_logger.addHandler(handler)
 
@@ -746,7 +748,7 @@
 
         if not self.newest:
             return
-        
+
         ws = zc.buildout.easy_install.install(
             [
             (spec + ' ' + self['buildout'].get(spec+'-version', '')).strip()
@@ -790,8 +792,8 @@
             if not __debug__:
                 args.insert(0, '-O')
             args.insert(0, zc.buildout.easy_install._safe_arg (sys.executable))
-            os.execv(sys.executable, args)            
-        
+            os.execv(sys.executable, args)
+
         self._logger.info("Upgraded:\n  %s;\nrestarting.",
                           ",\n  ".join([("%s version %s"
                                        % (dist.project_name, dist.version)
@@ -800,7 +802,7 @@
                                       ]
                                      ),
                           )
-                
+
         # the new dist is different, so we've upgraded.
         # Update the scripts and return True
         zc.buildout.easy_install.scripts(
@@ -847,6 +849,14 @@
             for ep in pkg_resources.iter_entry_points('zc.buildout.extension'):
                 ep.load()(self)
 
+    def _unload_extensions(self):
+        __doing__ = 'Unloading extensions.'
+        specs = self['buildout'].get('extensions', '').split()
+        if specs:
+            for ep in pkg_resources.iter_entry_points(
+                'zc.buildout.unloadextension'):
+                ep.load()(self)
+
     def setup(self, args):
         if not args:
             raise zc.buildout.UserError(
@@ -870,13 +880,13 @@
                 ))
             if is_jython:
                 arg_list = list()
-                
+
                 for a in args:
                     add_args.append(zc.buildout.easy_install._safe_arg(a))
-                
+
                 subprocess.Popen([zc.buildout.easy_install._safe_arg(sys.executable)] + list(tsetup) +
                                 arg_list).wait()
-            
+
             else:
                 os.spawnl(os.P_WAIT, sys.executable, zc.buildout.easy_install._safe_arg (sys.executable), tsetup,
                         *[zc.buildout.easy_install._safe_arg(a)
@@ -902,7 +912,7 @@
         options = Options(self, section, data)
         self._data[section] = options
         options._initialize()
-        return options          
+        return options
 
     def __setitem__(self, key, value):
         raise NotImplementedError('__setitem__')
@@ -967,7 +977,7 @@
     def _initialize(self):
         name = self.name
         __doing__ = 'Initializing section %s.', name
-        
+
         # force substitutions
         for k, v in self._raw.items():
             if '${' in v:
@@ -975,11 +985,11 @@
 
         if self.name == 'buildout':
             return # buildout section can never be a part
-        
+
         recipe = self.get('recipe')
         if not recipe:
             return
-        
+
         reqs, entry = _recipe(self._data)
         buildout = self.buildout
         recipe_class = _install_and_load(reqs, 'zc.buildout', entry, buildout)
@@ -1051,7 +1061,7 @@
                         "The option name in substitution, %s,\n"
                         "has invalid characters."
                         % ref)
-                
+
             v = self.buildout[s[0]].get(s[1], None, seen)
             if v is None:
                 raise MissingOption("Referenced option does not exist:", *s)
@@ -1059,7 +1069,7 @@
         subs.append('')
 
         return ''.join([''.join(v) for v in zip(value[::2], subs)])
-        
+
     def __getitem__(self, key):
         try:
             return self._data[key]
@@ -1163,7 +1173,7 @@
     if value.endswith('\n\t'):
         value = value[:-2] + '%(__buildout_space_n__)s'
     print >>f, option, '=', value
-    
+
 def _save_options(section, options, f):
     print >>f, '[%s]' % section
     items = options.items()
@@ -1238,8 +1248,8 @@
 
     seen.pop()
     return result
-    
 
+
 ignore_directories = '.svn', 'CVS'
 def _dir_hash(dir):
     hash = md5()
@@ -1254,7 +1264,7 @@
         for name in filenames:
             hash.update(open(os.path.join(dirpath, name)).read())
     return hash.digest().encode('base64').strip()
-    
+
 def _dists_sig(dists):
     result = []
     for dist in dists:
@@ -1276,7 +1286,7 @@
             s2[key] = "\n".join([v for v in s1.get(key, "").split('\n')
                                  if v not in s2[k].split('\n')])
             del s2[k]
-                
+
     s1.update(s2)
     return s1
 
@@ -1306,7 +1316,7 @@
         if d:
             doing.append(d)
         tb = tb.tb_next
-        
+
     if doing:
         sys.stderr.write('While:\n')
         for d in doing:
@@ -1363,13 +1373,13 @@
      Don't read user defaults.
 
   -o
-  
-    Run in off-line mode.  This is equivalent to the assignment 
+
+    Run in off-line mode.  This is equivalent to the assignment
     buildout:offline=true.
 
   -O
 
-    Run in non-off-line mode.  This is equivalent to the assignment 
+    Run in non-off-line mode.  This is equivalent to the assignment
     buildout:offline=false.  This is the default buildout mode.  The
     -O option would normally be used to override a true offline
     setting in a configuration file.
@@ -1383,10 +1393,10 @@
 
   -N
 
-    Run in non-newest mode.  This is equivalent to the assignment 
+    Run in non-newest mode.  This is equivalent to the assignment
     buildout:newest=false.  With this setting, buildout will not seek
     new distributions if installed distributions satisfy it's
-    requirements. 
+    requirements.
 
   -D
 
@@ -1436,7 +1446,7 @@
 
     The script can be given either as a script path or a path to a
     directory containing a setup.py script.
-    
+
 """
 def _help():
     print _usage
@@ -1478,7 +1488,7 @@
                 else:
                     _help()
                 op = op[1:]
-                
+
             if op[:1] in  ('c', 't'):
                 op_ = op[:1]
                 op = op[1:]
@@ -1555,8 +1565,8 @@
                     sys.stderr.write(_internal_error_template)
                     traceback.print_exception(*exc_info)
                     sys.exit(1)
-    
-            
+
+
     finally:
             logging.shutdown()
 

Modified: zc.buildout/branches/tlotze-download-api/src/zc/buildout/buildout.txt
===================================================================
--- zc.buildout/branches/tlotze-download-api/src/zc/buildout/buildout.txt	2009-06-22 09:33:30 UTC (rev 101214)
+++ zc.buildout/branches/tlotze-download-api/src/zc/buildout/buildout.txt	2009-06-22 10:04:58 UTC (rev 101215)
@@ -2368,15 +2368,17 @@
 Extensions
 ----------
 
-An **experimental** feature allows code to be loaded and run after
+A feature allows code to be loaded and run after
 configuration files have been read but before the buildout has begun
 any processing.  The intent is to allow special plugins such as
 urllib2 request handlers to be loaded.
 
 To load an extension, we use the extensions option and list one or
 more distribution requirements, on separate lines.  The distributions
-named will be loaded and any zc.buildout.extensions entry points found
-will be called with the buildout as an argument.
+named will be loaded and any ``zc.buildout.extension`` entry points found
+will be called with the buildout as an argument.  When buildout
+finishes processing, any ``zc.buildout.unloadextension`` entry points
+found will be called with the buildout as an argument.
 
 Let's create a sample extension in our sample buildout created in the
 previous section:
@@ -2387,6 +2389,8 @@
     ... """
     ... def ext(buildout):
     ...     print 'ext', list(buildout)
+    ... def unload(buildout):
+    ...     print 'unload', list(buildout)
     ... """)
 
     >>> write(sample_bootstrapped, 'demo', 'setup.py',
@@ -2395,7 +2399,10 @@
     ...
     ... setup(
     ...     name = "demo",
-    ...     entry_points = {'zc.buildout.extension': ['ext = demo:ext']},
+    ...     entry_points = {
+    ...        'zc.buildout.extension': ['ext = demo:ext'],
+    ...        'zc.buildout.unloadextension': ['ext = demo:unload'],
+    ...        },
     ...     )
     ... """)
 
@@ -2436,6 +2443,7 @@
     >>> print system(os.path.join(sample_bootstrapped, 'bin', 'buildout')),
     ext ['buildout']
     Develop: '/sample-bootstrapped/demo'
+    unload ['buildout']
 
 Allow hosts
 -----------

Modified: zc.buildout/branches/tlotze-download-api/src/zc/buildout/easy_install.py
===================================================================
--- zc.buildout/branches/tlotze-download-api/src/zc/buildout/easy_install.py	2009-06-22 09:33:30 UTC (rev 101214)
+++ zc.buildout/branches/tlotze-download-api/src/zc/buildout/easy_install.py	2009-06-22 10:04:58 UTC (rev 101215)
@@ -967,9 +967,10 @@
 
 def _relative_path_and_setup(sname, path, relative_paths):
     if relative_paths:
-        sname = os.path.abspath(sname)
+        relative_paths = os.path.normcase(relative_paths)
+        sname = os.path.normcase(os.path.abspath(sname))
         spath = ',\n  '.join(
-            [_relativitize(path_item, sname, relative_paths)
+            [_relativitize(os.path.normcase(path_item), sname, relative_paths)
              for path_item in path]
             )
         rpsetup = relative_paths_setup

Modified: zc.buildout/branches/tlotze-download-api/src/zc/buildout/easy_install.txt
===================================================================
--- zc.buildout/branches/tlotze-download-api/src/zc/buildout/easy_install.txt	2009-06-22 09:33:30 UTC (rev 101214)
+++ zc.buildout/branches/tlotze-download-api/src/zc/buildout/easy_install.txt	2009-06-22 10:04:58 UTC (rev 101215)
@@ -717,9 +717,10 @@
 We can pass a keyword argument, extra paths, to cause additional paths
 to be included in the a generated script:
 
+    >>> foo = tmpdir('foo')
     >>> scripts = zc.buildout.easy_install.scripts(
     ...    ['demo'], ws, sys.executable, bin, dict(demo='run'),
-    ...    extra_paths=['/foo/bar'])
+    ...    extra_paths=[foo])
 
     >>> cat(bin, 'run') # doctest: +NORMALIZE_WHITESPACE
     #!/usr/local/bin/python2.4
@@ -728,7 +729,7 @@
     sys.path[0:0] = [
       '/sample-install/demo-0.3-py2.4.egg',
       '/sample-install/demoneeded-1.1-py2.4.egg',
-      '/foo/bar',
+      '/foo',
       ]
     <BLANKLINE>
     import eggrecipedemo
@@ -795,6 +796,7 @@
 to pass a common base directory of the scripts and eggs:
 
     >>> bo = tmpdir('bo')
+    >>> ba = tmpdir('ba')
     >>> mkdir(bo, 'eggs')
     >>> mkdir(bo, 'bin')
     >>> mkdir(bo, 'other')
@@ -805,7 +807,7 @@
 
     >>> scripts = zc.buildout.easy_install.scripts(
     ...    ['demo'], ws, sys.executable, join(bo, 'bin'), dict(demo='run'),
-    ...    extra_paths=[os.path.sep+'foo', join(bo, 'bar')],
+    ...    extra_paths=[ba, join(bo, 'bar')],
     ...    interpreter='py',
     ...    relative_paths=bo)
 
@@ -822,7 +824,7 @@
     sys.path[0:0] = [
       join(base, 'eggs/demo-0.3-pyN.N.egg'),
       join(base, 'eggs/demoneeded-1.1-pyN.N.egg'),
-      '/foo',
+      '/ba',
       join(base, 'bar'),
       ]
     <BLANKLINE>
@@ -855,7 +857,7 @@
     sys.path[0:0] = [
       join(base, 'eggs/demo-0.3-pyN.N.egg'),
       join(base, 'eggs/demoneeded-1.1-pyN.N.egg'),
-      '/foo',
+      '/ba',
       join(base, 'bar'),
       ]
     <BLANKLINE>

Modified: zc.buildout/branches/tlotze-download-api/src/zc/buildout/testing.py
===================================================================
--- zc.buildout/branches/tlotze-download-api/src/zc/buildout/testing.py	2009-06-22 09:33:30 UTC (rev 101214)
+++ zc.buildout/branches/tlotze-download-api/src/zc/buildout/testing.py	2009-06-22 10:04:58 UTC (rev 101215)
@@ -86,6 +86,8 @@
     fsync(f.fileno())
     f.close()
 
+## FIXME - check for other platforms
+MUST_CLOSE_FDS = not sys.platform.startswith('win')
 
 def system(command, input=''):
     p = subprocess.Popen(command,
@@ -93,7 +95,7 @@
                          stdin=subprocess.PIPE,
                          stdout=subprocess.PIPE,
                          stderr=subprocess.PIPE,
-                         close_fds=not is_win32)
+                         close_fds=MUST_CLOSE_FDS)
     i, o, e = (p.stdin, p.stdout, p.stderr)
     if input:
         i.write(input)
@@ -146,7 +148,7 @@
                              stdin=subprocess.PIPE,
                              stdout=subprocess.PIPE,
                              stderr=subprocess.STDOUT,
-                             close_fds=True)
+                             close_fds=MUST_CLOSE_FDS)
         i, o = (p.stdin, p.stdout)
         i.close()
         e = o.read().strip()
@@ -159,7 +161,7 @@
                              stdin=subprocess.PIPE,
                              stdout=subprocess.PIPE,
                              stderr=subprocess.STDOUT,
-                             close_fds=True)
+                             close_fds=MUST_CLOSE_FDS)
         i, o = (p.stdin, p.stdout)
         i.close()
         e = o.read().strip()
@@ -171,7 +173,7 @@
                                 stdin=subprocess.PIPE,
                                 stdout=subprocess.PIPE,
                                 stderr=subprocess.STDOUT,
-                                close_fds=True)
+                                close_fds=MUST_CLOSE_FDS)
             i, o = (p.stdin, p.stdout)
             i.close()
             e = o.read().strip()
@@ -495,6 +497,8 @@
     _normalize_path,
     )
 
+normalize_endings = re.compile('\r\n'), '\n'
+
 normalize_script = (
     re.compile('(\n?)-  ([a-zA-Z_.-]+)-script.py\n-  \\2.exe\n'),
     '\\1-  \\2\n')

Modified: zc.buildout/branches/tlotze-download-api/src/zc/buildout/tests.py
===================================================================
--- zc.buildout/branches/tlotze-download-api/src/zc/buildout/tests.py	2009-06-22 09:33:30 UTC (rev 101214)
+++ zc.buildout/branches/tlotze-download-api/src/zc/buildout/tests.py	2009-06-22 10:04:58 UTC (rev 101215)
@@ -2738,6 +2738,7 @@
             tearDown=zc.buildout.testing.buildoutTearDown,
             checker=renormalizing.RENormalizing([
                zc.buildout.testing.normalize_path,
+               zc.buildout.testing.normalize_endings,
                zc.buildout.testing.normalize_script,
                zc.buildout.testing.normalize_egg_py,
                (re.compile('__buildout_signature__ = recipes-\S+'),
@@ -2767,6 +2768,7 @@
             tearDown=zc.buildout.testing.buildoutTearDown,
             checker=renormalizing.RENormalizing([
                zc.buildout.testing.normalize_path,
+               zc.buildout.testing.normalize_endings,
                (re.compile(r'\S+buildout.py'), 'buildout.py'),
                (re.compile(r'line \d+'), 'line NNN'),
                (re.compile(r'py\(\d+\)'), 'py(NNN)'),
@@ -2779,6 +2781,7 @@
             tearDown=zc.buildout.testing.buildoutTearDown,
             checker=renormalizing.RENormalizing([
                zc.buildout.testing.normalize_path,
+               zc.buildout.testing.normalize_endings,
                zc.buildout.testing.normalize_script,
                zc.buildout.testing.normalize_egg_py,
                normalize_bang,
@@ -2799,11 +2802,13 @@
             tearDown=zc.buildout.testing.buildoutTearDown,
             checker=renormalizing.RENormalizing([
                zc.buildout.testing.normalize_path,
+               zc.buildout.testing.normalize_endings,
                zc.buildout.testing.normalize_script,
                zc.buildout.testing.normalize_egg_py,
                normalize_bang,
                (re.compile('extdemo[.]pyd'), 'extdemo.so'),
                (re.compile('[-d]  setuptools-\S+[.]egg'), 'setuptools.egg'),
+               (re.compile(r'\\[\\]?'), '/'),
                ]),
             ),
 
@@ -2826,6 +2831,7 @@
             tearDown=zc.buildout.testing.buildoutTearDown,
             checker=renormalizing.RENormalizing([
                zc.buildout.testing.normalize_path,
+               zc.buildout.testing.normalize_endings,
                zc.buildout.testing.normalize_script,
                zc.buildout.testing.normalize_egg_py,
                (re.compile("buildout: Running \S*setup.py"),
@@ -2856,6 +2862,7 @@
             tearDown=zc.buildout.testing.buildoutTearDown,
             checker=renormalizing.RENormalizing([
                zc.buildout.testing.normalize_path,
+               zc.buildout.testing.normalize_endings,
                zc.buildout.testing.normalize_script,
                zc.buildout.testing.normalize_egg_py,
                (re.compile('__buildout_signature__ = recipes-\S+'),
@@ -2900,12 +2907,11 @@
             tearDown=zc.buildout.testing.buildoutTearDown,
             checker=renormalizing.RENormalizing([
                zc.buildout.testing.normalize_path,
+               zc.buildout.testing.normalize_endings,
                zc.buildout.testing.normalize_script,
                normalize_bang,
+               (re.compile('Downloading.*setuptools.*egg\n'), ''),
                ]),
             ))
 
     return unittest.TestSuite(test_suite)
-
-
-

Modified: zc.buildout/branches/tlotze-download-api/zc.recipe.egg_/src/zc/recipe/egg/tests.py
===================================================================
--- zc.buildout/branches/tlotze-download-api/zc.recipe.egg_/src/zc/recipe/egg/tests.py	2009-06-22 09:33:30 UTC (rev 101214)
+++ zc.buildout/branches/tlotze-download-api/zc.recipe.egg_/src/zc/recipe/egg/tests.py	2009-06-22 10:04:58 UTC (rev 101215)
@@ -44,6 +44,7 @@
             setUp=setUp, tearDown=zc.buildout.testing.buildoutTearDown,
             checker=renormalizing.RENormalizing([
                zc.buildout.testing.normalize_path,
+               zc.buildout.testing.normalize_endings,
                zc.buildout.testing.normalize_script,
                zc.buildout.testing.normalize_egg_py,
                zc.buildout.tests.normalize_bang,
@@ -57,6 +58,7 @@
             setUp=setUp, tearDown=zc.buildout.testing.buildoutTearDown,
             checker=renormalizing.RENormalizing([
                zc.buildout.testing.normalize_path,
+               zc.buildout.testing.normalize_endings,
                (re.compile('__buildout_signature__ = '
                            'sample-\S+\s+'
                            'zc.recipe.egg-\S+\s+'
@@ -77,6 +79,7 @@
             setUp=setUp, tearDown=zc.buildout.testing.buildoutTearDown,
             checker=renormalizing.RENormalizing([
                zc.buildout.testing.normalize_path,
+               zc.buildout.testing.normalize_endings,
                (re.compile("(d  ((ext)?demo(needed)?|other)"
                            "-\d[.]\d-py)\d[.]\d(-\S+)?[.]egg"),
                 '\\1V.V.egg'),
@@ -97,9 +100,11 @@
                 tearDown=zc.buildout.testing.buildoutTearDown,
                 checker=renormalizing.RENormalizing([
                    zc.buildout.testing.normalize_path,
+                   zc.buildout.testing.normalize_endings,
                    zc.buildout.testing.normalize_script,
                    (re.compile('Got setuptools \S+'), 'Got setuptools V'),
-                   (re.compile('([d-]  )?setuptools-\S+-py'), 'setuptools-V-py'),
+                   (re.compile('([d-]  )?setuptools-\S+-py'),
+                    'setuptools-V-py'),
                    (re.compile('-py2[.][0-35-9][.]'), 'py2.5.'),
                    (re.compile('zc.buildout-\S+[.]egg'),
                     'zc.buildout.egg'),



More information about the Checkins mailing list