[python-paver: 1/2] Update to upstream 1.2.0 release

Toshio くらとみ toshio at fedoraproject.org
Tue Feb 26 00:53:20 UTC 2013


commit ea467637418ab8b2c7f37b18705ba12e6c056c31
Author: Toshio Kuratomi <toshio at fedoraproject.org>
Date:   Mon Feb 25 16:50:00 2013 -0800

    Update to upstream 1.2.0 release
    
    - samefile patch merged upstream
    - Patch to unbundle included python-six
    - Disable cog as it's not packaged yet
    - Remove the unittests from the binary rpm

 .gitignore           |    1 +
 paver-unbundle.patch | 1182 ++++++++++++++++++++++++++++++++++++++++++++++++++
 python-paver.spec    |   26 +-
 sources              |    2 +-
 4 files changed, 1203 insertions(+), 8 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index cd7977e..54488da 100644
--- a/.gitignore
+++ b/.gitignore
@@ -3,3 +3,4 @@ Paver-1.0.3.tar.gz
 /Paver-1.0.5.tar.gz
 /Paver-1.1.0.tar.gz
 /Paver-1.1.1.tar.gz
+/Paver-1.2.0.tar.gz
diff --git a/paver-unbundle.patch b/paver-unbundle.patch
new file mode 100644
index 0000000..acd926b
--- /dev/null
+++ b/paver-unbundle.patch
@@ -0,0 +1,1182 @@
+Index: Paver-1.2.0/paver/doctools.py
+===================================================================
+--- Paver-1.2.0.orig/paver/doctools.py
++++ Paver-1.2.0/paver/doctools.py
+@@ -29,7 +29,7 @@ def _get_paths():
+     builddir.mkdir_p()
+     srcdir = docroot / opts.get("sourcedir", "")
+     if not srcdir.exists():
+-        raise BuildFailure("Sphinx source file dir (%s) does not exist" 
++        raise BuildFailure("Sphinx source file dir (%s) does not exist"
+                             % srcdir)
+     htmldir = builddir / "html"
+     htmldir.mkdir_p()
+@@ -55,7 +55,7 @@ def html():
+         raise BuildFailure('install sphinx to build html docs')
+     options.order('sphinx', add_rest=True)
+     paths = _get_paths()
+-    sphinxopts = ['', '-b', 'html', '-d', paths.doctrees, 
++    sphinxopts = ['', '-b', 'html', '-d', paths.doctrees,
+         paths.srcdir, paths.htmldir]
+     dry("sphinx-build %s" % (" ".join(sphinxopts),), sphinx.main, sphinxopts)
+ 
+@@ -76,41 +76,41 @@ class SectionedFile(object):
+     """Loads a file into memory and keeps track of all of the
+     sections found in the file. Sections are started with a
+     line that looks like this::
+-    
++
+       [[[section SECTIONNAME]]]
+-    
++
+     Anything else can appear on the line outside of the brackets
+     (so if you're in a source code file, you can put the section marker
+     in a comment). The entire lines containing the section markers are
+     not included when you request the text from the file.
+-    
++
+     An end of section marker looks like this::
+-    
++
+       [[[endsection]]]
+-      
++
+     Sections can be nested. If you do nest sections, you will use
+     dotted notation to refer to the inner sections. For example,
+     a "dessert" section within an "order" section would be referred
+     to as "order.dessert".
+-    
++
+     The SectionedFile provides dictionary-style access to the
+     sections. If you have a SectionedFile named 'sf',
+     sf[sectionname] will give you back a string of that section
+     of the file, including any inner sections. There won't
+     be any section markers in that string.
+-    
++
+     You can get the text of the whole file via the ``all`` property
+     (for example, ``sf.all``).
+-    
++
+     Section names must be unique across the file, but inner section
+     names are kept track of by the full dotted name. So you can
+     have a "dessert" section that is contained within two different
+     outer sections.
+-    
++
+     Ending a section without starting one or ending the file without
+     ending a section will yield BuildFailures.
+     """
+-    
++
+     def __init__(self, filename=None, from_string=None):
+         """Initialize this SectionedFile object from a file or string.
+         If ``from_string`` is provided, that is the text that will
+@@ -121,26 +121,29 @@ class SectionedFile(object):
+         self.contents = []
+         self.sections = {}
+         if from_string is not None:
+-            from paver.deps.six import StringIO
++            try:
++                from six import StringIO
++            except ImportError:
++                from paver.deps.six import StringIO
+             self._read_file(StringIO(from_string))
+         else:
+             with open(filename) as f:
+                 self._read_file(f)
+-        
++
+     def _read_file(self, f):
+         """Do the work of reading the file."""
+         contents = self.contents
+         sections = self.sections
+         real_lineno = 1
+         output_lineno = 0
+-        
++
+         stack = []
+         line = f.readline()
+         while line:
+             m = _sectionmarker.search(line)
+             if m:
+                 section = m.group(1)
+-                debug("Section %s found at %s (%s)", section, real_lineno, 
++                debug("Section %s found at %s (%s)", section, real_lineno,
+                       output_lineno)
+                 stack.append(section)
+                 sectionname = ".".join(stack)
+@@ -158,7 +161,7 @@ class SectionedFile(object):
+                 except IndexError:
+                     raise BuildFailure("""End section marker with no starting marker
+ (in file '%s', at line %s)""" % (self.filename, real_lineno))
+-                debug("Section %s end at %s (%s)", section, real_lineno, 
++                debug("Section %s end at %s (%s)", section, real_lineno,
+                       output_lineno)
+                 sections[sectionname].append(output_lineno)
+             else:
+@@ -169,9 +172,9 @@ class SectionedFile(object):
+         if stack:
+             section = ".".join(stack)
+             raise BuildFailure("""No end marker for section '%s'
+-(in file '%s', starts at line %s)""" % (section, self.filename, 
++(in file '%s', starts at line %s)""" % (section, self.filename,
+                                         sections[section][0]))
+-    
++
+     def __getitem__(self, key):
+         """Look up a section, and return the text of the section."""
+         try:
+@@ -180,14 +183,14 @@ class SectionedFile(object):
+             raise BuildFailure("No section '%s' in file '%s'" %
+                                (key, self.filename))
+         return "".join(self.contents[pos[1]:pos[2]])
+-    
++
+     def __len__(self):
+         """Number of sections available in the file."""
+         return len(self.sections)
+-    
++
+     def keys(self):
+         return self.sections.keys()
+-    
++
+     @property
+     def all(self):
+         """Property to get access to the whole file."""
+@@ -199,26 +202,26 @@ _default_include_marker = dict(
+ 
+ class Includer(object):
+     """Looks up SectionedFiles relative to the basedir.
+-    
++
+     When called with a filename and an optional section, the Includer
+     will:
+-    
++
+     1. look up that file relative to the basedir in a cache
+     2. load it as a SectionedFile if it's not in the cache
+     3. return the whole file if section is None
+     4. return just the section desired if a section is requested
+-    
++
+     If a cog object is provided at initialization, the text will be
+     output (via cog's out) rather than returned as
+     a string.
+-    
++
+     You can pass in include_markers which is a dictionary that maps
+     file extensions to the single line comment character for that
+     file type. If there is an include marker available, then
+     output like:
+-    
++
+     # section 'sectionname' from 'file.py'
+-    
++
+     There are some default include markers. If you don't pass
+     in anything, no include markers will be displayed. If you
+     pass in an empty dictionary, the default ones will
+@@ -233,7 +236,7 @@ class Includer(object):
+         self.basedir = path(basedir)
+         self.cog = cog
+         self.files = {}
+-    
++
+     def __call__(self, fn, section=None):
+         f = self.files.get(fn)
+         if f is None:
+@@ -279,23 +282,23 @@ def _runcog(options, uncog=False):
+     c.options.bDeleteCode = options.get("delete_code", False)
+     includedir = options.get('includedir', None)
+     if includedir:
+-        include = Includer(includedir, cog=c, 
++        include = Includer(includedir, cog=c,
+                            include_markers=options.get("include_markers"))
+         # load cog's namespace with our convenience functions.
+         c.options.defines['include'] = include
+         c.options.defines['sh'] = _cogsh(c)
+-    
++
+     c.options.defines.update(options.get("defines", {}))
+ 
+     c.sBeginSpec = options.get('beginspec', '[[[cog')
+     c.sEndSpec = options.get('endspec', ']]]')
+     c.sEndOutput = options.get('endoutput', '[[[end]]]')
+-    
++
+     basedir = options.get('basedir', None)
+     if basedir is None:
+         basedir = path(options.get('docroot', "docs")) / options.get('sourcedir', "")
+     basedir = path(basedir)
+-        
++
+     pattern = options.get("pattern", "*.rst")
+     if pattern:
+         files = basedir.walkfiles(pattern)
+@@ -303,31 +306,31 @@ def _runcog(options, uncog=False):
+         files = basedir.walkfiles()
+     for f in files:
+         dry("cog %s" % f, c.processOneFile, f)
+-    
++
+ 
+ @task
+ def cog(options):
+-    """Runs the cog code generator against the files matching your 
++    """Runs the cog code generator against the files matching your
+     specification. By default, cog will run against any .rst files
+     in your Sphinx document root. Full documentation for Cog is
+     here:
+-    
++
+     http://nedbatchelder.com/code/cog/
+-    
++
+     In a nutshell, you put blocks in your file that look like
+     this:
+-    
++
+     [[[cog cog.outl("Hi there!")
+     ]]]
+     [[[end]]]
+-    
++
+     Cog will replace the space between ]]] and [[[end]]] with
+     the generated output. In this case, Hi there!
+-    
++
+     Here are the options available for the cog task. These are
+     looked up in the 'cog' options section by default. The
+     'sphinx' option set is also searched.
+-    
++
+     basedir
+         directory to look in for files to cog. If not set,
+         'docroot' is looked up.
+@@ -336,7 +339,7 @@ def cog(options):
+     includedir
+         If you have external files to include in your
+         documentation, setting includedir to the root
+-        of those files will put a paver.doctools.Includer 
++        of those files will put a paver.doctools.Includer
+         in your Cog namespace as 'include'. This lets you
+         easily include files and sections of files. Here's
+         an example usage::
+@@ -365,9 +368,9 @@ def cog(options):
+         For example, 'py' maps to '# '. If there is a known
+         include marker for a given file, then a comment
+         will be displayed along the lines of:
+-        
++
+         # section 'SECTIONNAME' in file 'foo.py'
+-        
++
+         If this option is not set, these lines will not
+         be displayed at all. If this option is set to an
+         empty dictionary, the default include markers
+@@ -375,13 +378,13 @@ def cog(options):
+         extension -> include marker settings.
+     """
+     _runcog(options)
+-    
++
+ @task
+ def uncog(options):
+     """Remove the Cog generated code from files. Often, you will want to
+     do this before committing code under source control, because you
+     don't generally want generated code in your version control system.
+-    
++
+     This takes the same options as the cog task. Look there for
+     more information.
+     """
+Index: Paver-1.2.0/paver/misctasks.py
+===================================================================
+--- Paver-1.2.0.orig/paver/misctasks.py
++++ Paver-1.2.0/paver/misctasks.py
+@@ -1,7 +1,10 @@
+ """Miscellaneous tasks that don't fit into one of the other groupings."""
+ import pkgutil
+ import zipfile
+-import paver.deps.six as six
++try:
++    import six
++except ImportError:
++    import paver.deps.six as six
+ from os.path import join, dirname, exists, abspath
+ from paver.easy import dry, task
+ from paver.tasks import VERSION, cmdopts
+@@ -13,7 +16,7 @@ if exists(_docsdir):
+         """Open your web browser and display Paver's documentation."""
+         import webbrowser
+         webbrowser.open("file://%s"  % join(abspath(_docsdir), 'index.html') )
+-        
++
+ @task
+ @cmdopts([('versioned_name', '', 'Determine if minilib uses version in its name')],
+             share_with=['generate_setup'])
+@@ -31,7 +34,7 @@ def minilib(options):
+         purpose is to avoid import error while using different versions of minilib
+         with easy_install
+         (default False)
+-    
++
+     extra_files
+         list of other paver modules to include (don't include the .py
+         extension). By default, the following modules are included:
+@@ -68,7 +71,7 @@ def minilib(options):
+ @cmdopts([('versioned_name', '', 'Determine if setup refers to minilib with version in its name')],
+             share_with=['minilib'])
+ def generate_setup(options):
+-    """Generates a setup.py file that uses paver behind the scenes. This 
++    """Generates a setup.py file that uses paver behind the scenes. This
+     setup.py file will look in the directory that the user is running it
+     in for a paver-minilib.zip and will add that to sys.path if available.
+     Otherwise, it will just assume that paver is available."""
+Index: Paver-1.2.0/paver/setuputils.py
+===================================================================
+--- Paver-1.2.0.orig/paver/setuputils.py
++++ Paver-1.2.0/paver/setuputils.py
+@@ -14,7 +14,10 @@ except ImportError:
+ from distutils.errors import DistutilsModuleError
+ _Distribution = dist.Distribution
+ 
+-from paver.deps.six import print_
++try:
++    from six import print_
++except ImportError:
++    from paver.deps.six import print_
+ 
+ from paver.options import Bunch
+ 
+@@ -93,7 +96,7 @@ def find_package_data(
+ 
+     Note patterns use wildcards, or can be exact paths (including
+     leading ``./``), and all searching is case-insensitive.
+-    
++
+     This function is by Ian Bicking.
+     """
+ 
+@@ -160,7 +163,7 @@ class DistutilsTask(tasks.Task):
+         self.negative_opt = getattr(command_class, "negative_opt", {})
+         # Parse distutils config files.
+         distribution.parse_config_files()
+-        
++
+     def __call__(self, *args, **kw):
+         options = tasks.environment.options.get(self.shortname, {})
+         opt_dict = self.distribution.get_option_dict(self.command_name)
+@@ -173,11 +176,11 @@ class DistutilsTask(tasks.Task):
+             _extra_command_dispatch[cmd_class](self.distribution, self.command_name)
+         else:
+             self.distribution.run_command(self.command_name)
+-        
++
+     @property
+     def description(self):
+         return self.command_class.description
+-        
++
+ def _get_shortname(taskname):
+     dotindex = taskname.rfind(".")
+     if dotindex > -1:
+@@ -185,7 +188,7 @@ def _get_shortname(taskname):
+     else:
+         command_name = taskname
+     return command_name
+-    
++
+ class DistutilsTaskFinder(object):
+     def get_task(self, taskname):
+         dist = _get_distribution()
+@@ -195,7 +198,7 @@ class DistutilsTaskFinder(object):
+         except DistutilsModuleError:
+             return None
+         return DistutilsTask(dist, command_name, command_class)
+-        
++
+     def get_tasks(self):
+         dist = _get_distribution()
+         if has_setuptools:
+@@ -209,7 +212,7 @@ class DistutilsTaskFinder(object):
+                     # py2app command
+                     tasks.environment.info("Could not load entry point: %s", ep)
+         dist.get_command_list()
+-        return set(DistutilsTask(dist, key, value) 
++        return set(DistutilsTask(dist, key, value)
+             for key, value in dist.cmdclass.items())
+ 
+ def _get_distribution():
+@@ -255,7 +258,7 @@ def _debug(message, *args):
+ def _base_log(level, message, *args):
+     """Displays a message at the given log level"""
+     tasks.environment._log(level, message, args)
+-    
++
+ # monkeypatch the distutils logging to go through Paver's logging
+ log.log = _base_log
+ log.debug = _debug
+@@ -267,8 +270,8 @@ log.fatal = _error
+ 
+ if has_setuptools:
+     __ALL__.extend(["find_packages"])
+-    
++
+     from setuptools import find_packages
+ else:
+     import distutils.core
+-    
++
+Index: Paver-1.2.0/paver/tasks.py
+===================================================================
+--- Paver-1.2.0.orig/paver/tasks.py
++++ Paver-1.2.0/paver/tasks.py
+@@ -11,8 +11,12 @@ import traceback
+ 
+ from os.path import *
+ 
+-import paver.deps.six as six
+-from paver.deps.six import print_
++try:
++    import six
++    from six import print_
++except ImportError:
++    import paver.deps.six as six
++    from paver.deps.six import print_
+ 
+ # using six.moves is complicated because we include it and it's thus not at
+ # the top level
+Index: Paver-1.2.0/paver/tests/test_doctools.py
+===================================================================
+--- Paver-1.2.0.orig/paver/tests/test_doctools.py
++++ Paver-1.2.0/paver/tests/test_doctools.py
+@@ -2,7 +2,10 @@ from __future__ import with_statement
+ import sys
+ 
+ from nose.plugins.skip import SkipTest
+-from paver.deps.six import print_
++try:
++    from six import print_
++except ImportError:
++    from paver.deps.six import print_
+ 
+ from paver.easy import *
+ from paver import doctools, tasks, options
+@@ -74,7 +77,7 @@ Second one.
+         assert str(e) == """section 'foo' redefined
+ (in file 'None', first section at line 2, second at line 6)""", \
+         "error was: %s" % (str(e))
+-        
++
+ 
+ def test_endmarker_without_start():
+     myfile = """
+@@ -107,7 +110,7 @@ def test_whole_file():
+     Hi there.
+     Yo.
+ """, "All was: %s" % (f.all)
+-    
++
+ def test_bad_section():
+     f = doctools.SectionedFile(from_string="")
+     try:
+@@ -117,7 +120,7 @@ def test_bad_section():
+         e = sys.exc_info()[1]
+         assert str(e) == "No section 'foo' in file 'None'", \
+                "Error: '%s'" % (str(e))
+-    
++
+ def test_include_lookup():
+     basedir = path(__file__).dirname() / "data"
+     include = doctools.Includer(basedir, include_markers={})
+@@ -135,7 +138,7 @@ print "Hi!"
+     assert second == """# section 'second.inner' in file 't2.py'
+ print sys.path
+ """, "Second was '%s'" % (second)
+-    
++
+ def test_cogging():
+     _no25()
+     env = tasks.Environment(doctools)
+@@ -157,7 +160,7 @@ def test_cogging():
+     with open(textfile) as f:
+         data = f.read()
+     assert "print sys.path" not in data
+-    
++
+ def test_cogging_with_markers_removed():
+     _no25()
+     env = tasks.Environment(doctools)
+Index: Paver-1.2.0/paver/tests/test_easy.py
+===================================================================
+--- Paver-1.2.0.orig/paver/tests/test_easy.py
++++ Paver-1.2.0/paver/tests/test_easy.py
+@@ -1,5 +1,8 @@
+ import sys
+-from paver.deps.six import b
++try:
++    from six import b
++except ImportError:
++    from paver.deps.six import b
+ from mock import patch, Mock
+ from paver import easy
+ from subprocess import PIPE, STDOUT
+Index: Paver-1.2.0/paver/tests/test_setuputils.py
+===================================================================
+--- Paver-1.2.0.orig/paver/tests/test_setuputils.py
++++ Paver-1.2.0/paver/tests/test_setuputils.py
+@@ -1,5 +1,8 @@
+ from distutils.core import Command
+-from paver.deps.six import print_
++try:
++    from six import print_
++except ImportError:
++    from paver.deps.six import print_
+ 
+ from paver.setuputils import install_distutils_tasks, \
+                             DistutilsTaskFinder, _get_distribution, \
+@@ -14,18 +17,18 @@ class _sdist(Command):
+     user_options = [("foo", "f", "Foo"), ("no-foo", None, "No Foo")]
+     boolean_options = ['foo']
+     negative_opt = {'no-foo' : 'foo'}
+-    
++
+     def initialize_options(self):
+         self.foo = False
+-        
++
+     def finalize_options(self):
+         pass
+-    
++
+     def run(self):
+         _sdist.called = True
+         _sdist.foo_set = self.foo
+         _sdist.fin = self.get_finalized_command("sdist")
+-    
++
+     @classmethod
+     def reset(cls):
+         cls.called = False
+@@ -42,13 +45,13 @@ def test_override_distutils_command():
+     @tasks.task
+     def sdist():
+         pass
+-    
++
+     env = _set_environment(sdist=sdist)
+     env.options = options.Bunch(setup=options.Bunch())
+-    
++
+     install_distutils_tasks()
+     d = _get_distribution()
+-    
++
+     d.cmdclass['sdist'] = _sdist
+     tasks._process_commands(['sdist', 'paver.tests.test_setuputils.sdist', '-f'])
+     assert sdist.called
+@@ -70,24 +73,24 @@ def test_distutils_task_finder():
+ 
+ def test_task_with_distutils_dep():
+     _sdist.reset()
+-    
++
+     @tasks.task
+     @tasks.needs("paver.tests.test_setuputils.sdist")
+     def sdist():
+         assert _sdist.called
+-        
++
+     env = _set_environment(sdist=sdist)
+     env.options = options.Bunch(setup=options.Bunch())
+     install_distutils_tasks()
+     d = _get_distribution()
+     d.cmdclass['sdist'] = _sdist
+-    
++
+     task_obj = env.get_task('sdist')
+     assert task_obj == sdist
+     needs_obj = env.get_task(task_obj.needs[0])
+     assert isinstance(needs_obj, DistutilsTask)
+     assert needs_obj.command_class == _sdist
+-    
++
+     tasks._process_commands(['sdist', "-f"])
+     assert sdist.called
+     assert _sdist.called
+@@ -95,7 +98,7 @@ def test_task_with_distutils_dep():
+     print_("Cmd is: %s" % cmd)
+     assert cmd.foo
+     assert _sdist.foo_set
+-    
++
+ def test_distutils_tasks_should_not_get_extra_options():
+     _sdist.reset()
+     env = _set_environment()
+@@ -103,7 +106,7 @@ def test_distutils_tasks_should_not_get_
+     install_distutils_tasks()
+     d = _get_distribution()
+     d.cmdclass['sdist'] = _sdist
+-    
++
+     tasks._process_commands(['sdist'])
+     assert _sdist.called
+     assert not _sdist.foo_set
+Index: Paver-1.2.0/paver/tests/test_tasks.py
+===================================================================
+--- Paver-1.2.0.orig/paver/tests/test_tasks.py
++++ Paver-1.2.0/paver/tests/test_tasks.py
+@@ -2,7 +2,10 @@ from __future__ import with_statement
+ import os
+ from pprint import pprint
+ 
+-from paver.deps.six import print_
++try:
++    from six import print_
++except ImportError:
++    from paver.deps.six import print_
+ 
+ from paver import setuputils, misctasks, tasks, options
+ 
+@@ -15,18 +18,18 @@ def test_basic_dependencies():
+     @tasks.task
+     def t1():
+         pass
+-    
++
+     t1.called = False
+     t1.t2_was_called = False
+-    
++
+     @tasks.task
+     @tasks.needs('t1')
+     def t2():
+         assert t1.called
+         t1.t2_was_called = True
+-    
++
+     _set_environment(t1 = t1, t2=t2)
+-    
++
+     assert hasattr(tasks.environment.pavement, 't1')
+     t2()
+     assert t1.t2_was_called
+@@ -38,42 +41,42 @@ def global_t1():
+ def test_longname_resolution_in_dependencies():
+     global_t1.called = False
+     global_t1.t2_was_called = False
+-    
++
+     @tasks.task
+     @tasks.needs('paver.tests.test_tasks.global_t1')
+     def t2():
+         assert global_t1.called
+         global_t1.t2_was_called = True
+-    
++
+     _set_environment(t2=t2)
+     t2()
+     assert global_t1.t2_was_called
+-    
++
+ def test_chained_dependencies():
+     called = [False, False, False, False]
+-    
++
+     @tasks.task
+     def t1():
+         assert called == [False, False, False, False]
+         called[0] = True
+-    
++
+     @tasks.task
+     @tasks.needs('t1')
+     def t2():
+         assert called == [True, False, False, False]
+         called[1] = True
+-    
++
+     @tasks.task
+     def t3():
+         assert called == [True, True, False, False]
+         called[2] = True
+-    
++
+     @tasks.task
+     @tasks.needs('t2', 't3')
+     def t4():
+         assert called == [True, True, True, False]
+         called[3] = True
+-    
++
+     _set_environment(t1=t1,t2=t2,t3=t3,t4=t4)
+     t4()
+     assert called == [True, True, True, True], "Called was: %s" % (called)
+@@ -82,51 +85,51 @@ def test_backwards_compatible_needs():
+     @tasks.task
+     def t():
+         pass
+-    
++
+     @tasks.task
+     @tasks.needs(['t'])
+     def t2():
+         pass
+-    
++
+     @tasks.task
+     @tasks.needs('t')
+     def t3():
+         pass
+-    
++
+     env = _set_environment(t=t, t2=t2, t3=t3)
+     t3()
+     assert t.called
+     t.called = False
+-    
++
+     t2()
+     assert t.called
+ 
+ def test_tasks_dont_repeat():
+     called = [0, 0, 0, 0]
+-    
++
+     @tasks.task
+     def t1():
+         assert called == [0, 0, 0, 0]
+         called[0] += 1
+-    
++
+     @tasks.task
+     @tasks.needs('t1')
+     def t2():
+         assert called == [1, 0, 0, 0]
+         called[1] += 1
+-    
++
+     @tasks.task
+     @tasks.needs('t1')
+     def t3():
+         assert called == [1, 1, 0, 0]
+         called[2] += 1
+-    
++
+     @tasks.task
+     @tasks.needs('t2', 't3')
+     def t4():
+         assert called == [1, 1, 1, 0]
+         called[3] += 1
+-    
++
+     _set_environment(t1=t1,t2=t2,t3=t3,t4=t4)
+     t4()
+     assert called == [1, 1, 1, 1]
+@@ -135,7 +138,7 @@ def test_basic_command_line():
+     @tasks.task
+     def t1():
+         pass
+-        
++
+     _set_environment(t1=t1)
+     try:
+         tr, args = tasks._parse_command_line(['foo'])
+@@ -143,31 +146,31 @@ def test_basic_command_line():
+         assert False, "Expected BuildFailure exception for unknown task"
+     except tasks.BuildFailure:
+         pass
+-    
++
+     task, args = tasks._parse_command_line(['t1'])
+     assert task == t1
+-    
++
+     task, args = tasks._parse_command_line(['t1', 't2'])
+     assert task == t1
+     assert args == ['t2']
+-    
++
+ def test_list_tasks():
+     from paver import doctools
+-    
++
+     @tasks.task
+     def t1():
+         pass
+-        
++
+     _set_environment(t1=t1, doctools=doctools)
+     task_list = tasks.environment.get_tasks()
+     assert t1 in task_list
+     assert doctools.html in task_list
+-    
++
+ def test_environment_insertion():
+     @tasks.task
+     def t1(env):
+         pass
+-    
++
+     _set_environment(t1=t1)
+     t1()
+     assert t1.called
+@@ -176,20 +179,20 @@ def test_add_options_to_environment():
+     @tasks.task
+     def t1(options):
+         assert options.foo == 1
+-        
++
+     @tasks.task
+     def t2(options, env):
+         assert options.foo == 1
+         assert env.options == options
+-        
++
+     environment = _set_environment(t1=t1, t2=t2)
+     environment.options.foo = 1
+-    
++
+     t1()
+     t2()
+     assert t1.called
+     assert t2.called
+-    
++
+ def test_shortname_access():
+     environment = _set_environment(tasks=tasks)
+     task = environment.get_task("help")
+@@ -214,39 +217,39 @@ def test_task_command_line_options():
+     def t1(options):
+         assert options.foo == "1"
+         assert options.t1.foo == "1"
+-    
++
+     environment = _set_environment(t1=t1)
+     tasks._process_commands(['t1', '--foo', '1'])
+     assert t1.called
+-    
++
+ def test_setting_of_options_with_equals():
+     @tasks.task
+     def t1(options):
+         assert options.foo == '1'
+         assert not hasattr(options, 'bar')
+-    
++
+     @tasks.task
+     def t2(options):
+         assert options.foo == '1'
+         assert options.bar == '2'
+-    
++
+     environment = _set_environment(t1=t1, t2=t2)
+     tasks._process_commands(['foo=1', 't1', 'bar=2', 't2'])
+     assert t1.called
+     assert t2.called
+-    
++
+ def test_options_inherited_via_needs():
+     @tasks.task
+     @tasks.cmdopts([('foo=', 'f', "Foo!")])
+     def t1(options):
+         assert options.t1.foo == "1"
+-    
++
+     @tasks.task
+     @tasks.needs('t1')
+     @tasks.cmdopts([('bar=', 'b', "Bar!")])
+     def t2(options):
+         assert options.t2.bar == '2'
+-        
++
+     environment = _set_environment(t1=t1, t2=t2)
+     tasks._process_commands("t2 --foo 1 -b 2".split())
+     assert t1.called
+@@ -257,7 +260,7 @@ def test_options_inherited_via_needs_eve
+     @tasks.cmdopts([('foo=', 'f', "Foo!")])
+     def t1(options):
+         assert options.t1.foo == "1"
+-    
++
+     @tasks.task
+     @tasks.needs('t1')
+     @tasks.cmdopts([('bar=', 'b', "Bar!")])
+@@ -269,25 +272,25 @@ def test_options_inherited_via_needs_eve
+     @tasks.cmdopts([('spam=', 's', "Spam!")])
+     def t3(options):
+         assert options.t3.spam == '3'
+-        
++
+     environment = _set_environment(t1=t1, t2=t2, t3=t3)
+     tasks._process_commands("t3 --foo 1 -b 2 -s 3".split())
+     assert t1.called
+     assert t2.called
+     assert t3.called
+-    
++
+ def test_options_shouldnt_overlap():
+     @tasks.task
+     @tasks.cmdopts([('foo=', 'f', "Foo!")])
+     def t1(options):
+         assert False
+-    
++
+     @tasks.task
+     @tasks.needs('t1')
+     @tasks.cmdopts([('force=', 'f', "Force!")])
+     def t2(options):
+         assert False
+-        
++
+     environment = _set_environment(t1=t1, t2=t2)
+     try:
+         tasks._process_commands("t2 -f 1".split())
+@@ -300,13 +303,13 @@ def test_options_shouldnt_overlap_when_b
+     @tasks.cmdopts([('foo=', 'f', "Foo!")])
+     def t1(options):
+         assert False
+-    
++
+     @tasks.task
+     @tasks.needs('t1')
+     @tasks.cmdopts([('force=', 'f', "Force!")], share_with=['nonexisting_task'])
+     def t2(options):
+         assert False
+-        
++
+     environment = _set_environment(t1=t1, t2=t2)
+     try:
+         tasks._process_commands("t2 -f 1".split())
+@@ -319,13 +322,13 @@ def test_options_may_overlap_if_explicit
+     @tasks.cmdopts([('foo=', 'f', "Foo!")])
+     def t1(options):
+         assert options.t1.foo == "1"
+-    
++
+     @tasks.task
+     @tasks.needs('t1')
+     @tasks.cmdopts([('foo=', 'f', "Foo!")], share_with=['t1'])
+     def t2(options):
+         assert options.t2.foo == "1"
+-        
++
+     environment = _set_environment(t1=t1, t2=t2)
+ 
+     tasks._process_commands("t2 -f 1".split())
+@@ -338,13 +341,13 @@ def test_exactly_same_parameters_must_be
+     @tasks.cmdopts([('foo=', 'f', "Foo!")])
+     def t1(options):
+         assert False
+-    
++
+     @tasks.task
+     @tasks.needs('t1')
+     @tasks.cmdopts([('force=', 'f', "Force!")], share_with=['t1'])
+     def t2(options):
+         assert False
+-        
++
+     environment = _set_environment(t1=t1, t2=t2)
+     try:
+         tasks._process_commands("t2 -f 1".split())
+@@ -486,17 +489,17 @@ def test_optional_args_in_tasks():
+     tasks._process_commands(['t1', 't2'])
+     assert t1.called
+     assert t2.called
+-    
++
+ def test_debug_logging():
+     @tasks.task
+     def t1(debug):
+         debug("Hi %s", "there")
+-        
++
+     env = _set_environment(t1=t1, patch_print=True)
+     tasks._process_commands(['-v', 't1'])
+     assert env.patch_captured[-1] == "Hi there"
+     env.patch_captured = []
+-    
++
+     tasks._process_commands(['t1'])
+     assert env.patch_captured[-1] != "Hi there"
+ 
+@@ -504,35 +507,35 @@ def test_base_logging():
+     @tasks.task
+     def t1(info):
+         info("Hi %s", "you")
+-    
++
+     env = _set_environment(t1=t1, patch_print=True)
+     tasks._process_commands(['t1'])
+     assert env.patch_captured[-1] == 'Hi you'
+     env.patch_captured = []
+-    
++
+     tasks._process_commands(['-q', 't1'])
+     assert not env.patch_captured
+-    
++
+ def test_error_show_up_no_matter_what():
+     @tasks.task
+     def t1(error):
+         error("Hi %s", "error")
+-    
++
+     env = _set_environment(t1=t1, patch_print=True)
+     tasks._process_commands(['t1'])
+     assert env.patch_captured[-1] == "Hi error"
+     env.patch_captured = []
+-    
++
+     tasks._process_commands(['-q', 't1'])
+     assert env.patch_captured[-1] == "Hi error"
+-    
++
+ def test_all_messages_for_a_task_are_captured():
+     @tasks.task
+     def t1(debug, error):
+         debug("This is debug msg")
+         error("This is error msg")
+         raise tasks.BuildFailure("Yo, problem, yo")
+-    
++
+     env = _set_environment(t1=t1, patch_print=True)
+     try:
+         tasks._process_commands(['t1'])
+@@ -552,7 +555,7 @@ def test_messages_with_formatting_and_no
+ 
+     tasks._process_commands(['-q', 't1'])
+     assert env.patch_captured[-1] == "This is a %s message"
+-    
++
+ def test_alternate_pavement_option():
+     env = _set_environment()
+     tasks._parse_global_options([])
+@@ -574,7 +577,7 @@ def test_captured_output_shows_up_on_exc
+     def t1(debug, error):
+         debug("Dividing by zero!")
+         1/0
+-    
++
+     env = _set_environment(t1=t1, patch_print=True, patch_exit=1)
+     try:
+         tasks._process_commands(['t1'])
+@@ -582,7 +585,7 @@ def test_captured_output_shows_up_on_exc
+     except FakeExitException:
+         assert "Dividing by zero!" in "\n".join(env.patch_captured)
+         assert env.exit_code == 1
+-    
++
+ def test_calling_subpavement():
+     @tasks.task
+     def private_t1(options):
+@@ -590,7 +593,7 @@ def test_calling_subpavement():
+         tasks.call_pavement(subpavement, "t1")
+         # our options should not be mangled
+         assert options.foo == 2
+-    
++
+     env = _set_environment(private_t1=private_t1)
+     tasks._process_commands(['private_t1'])
+     # the value should be set by the other pavement, which runs
+@@ -602,14 +605,14 @@ class MyTaskFinder(object):
+         if name == "foo":
+             return self.foo
+         return None
+-        
++
+     def get_tasks(self):
+         return set([self.foo])
+-    
++
+     @tasks.task
+     def foo(self):
+         self.foo_called = True
+-    
++
+ def test_task_finders():
+     env = _set_environment()
+     mtf = MyTaskFinder()
+@@ -618,11 +621,11 @@ def test_task_finders():
+     assert t == mtf.foo
+     all_tasks = env.get_tasks()
+     assert mtf.foo in all_tasks
+-    
++
+ def test_calling_a_function_rather_than_task():
+     def foo():
+         pass
+-        
++
+     env = _set_environment(foo=foo)
+     try:
+         tasks._process_commands(['foo'])
+@@ -650,28 +653,28 @@ def test_description_retrieval_trial():
+     @tasks.task
+     def t1():
+         """ Task it is """
+-    
++
+     assert t1.description == "Task it is"
+ 
+ def test_description_empty_without_docstring():
+     @tasks.task
+     def t1():
+         pass
+-    
++
+     assert t1.description == ""
+ 
+ def test_description_retrieval_first_sentence():
+     @tasks.task
+     def t1():
+         """ Task it is. Not with another sentence. """
+-    
++
+     assert t1.description == "Task it is"
+ 
+ def test_description_retrieval_first_sentence_even_with_version_numbers():
+     @tasks.task
+     def t1():
+         """ Task it is, installs Django 1.0. Not with another sentence. """
+-    
++
+     assert t1.description == "Task it is, installs Django 1.0"
+ 
+ def test_auto_task_is_not_run_with_noauto():
+@@ -686,7 +689,7 @@ def test_auto_task_is_not_run_with_noaut
+ 
+     _set_environment(auto=auto, t1=t1)
+     tasks._process_commands(['t1'], auto_pending=True)
+-    
++
+     assert t1.called
+     assert not auto.called, "t1 is decorated with no_auto, it should not be called"
+ 
+@@ -712,7 +715,7 @@ def test_task_can_be_called_repeatedly()
+         info(options.args[0])
+ 
+     env = _set_environment(t1=t1, patch_print=True)
+-    
++
+     tasks._process_commands(['t1', 'spam'])
+     tasks._process_commands(['t1', 'eggs'])
+ 
+Index: Paver-1.2.0/paver/tests/utils.py
+===================================================================
+--- Paver-1.2.0.orig/paver/tests/utils.py
++++ Paver-1.2.0/paver/tests/utils.py
+@@ -1,5 +1,8 @@
+ import types
+-import paver.deps.six as six
++try:
++    import six
++except ImportError:
++    import paver.deps.six as six
+ 
+ from paver import setuputils, tasks
+ 
diff --git a/python-paver.spec b/python-paver.spec
index 93d7317..3fbf4c5 100644
--- a/python-paver.spec
+++ b/python-paver.spec
@@ -4,8 +4,8 @@
 
 %global srcname Paver
 Name: python-paver
-Version: 1.1.1
-Release: 2%{?dist}
+Version: 1.2.0
+Release: 1%{?dist}
 Summary: Python-based build/distribution/deployment scripting tool
 
 Group: Development/Languages
@@ -14,10 +14,8 @@ Group: Development/Languages
 License: BSD and (MIT or GPLv2)
 URL: http://www.blueskyonmars.com/projects/paver/
 Source0: http://pypi.python.org/packages/source/P/%{srcname}/%{srcname}-%{version}.tar.gz
-# Fix call to os.path.samefile
-# Submitted upstream https://github.com/paver/paver/pull/86
-# (Code has changed a little but this patch is the equivalent)
-Patch0: paver-samefile-fix.patch
+# Unbundle python-six
+Patch0: paver-unbundle.patch
 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 
 BuildArch: noarch
@@ -25,9 +23,12 @@ BuildRequires: python2-devel
 BuildRequires: python-setuptools
 BuildRequires: python-sphinx
 BuildRequires: python-nose
+BuildRequires: python-six
+BuildRequires: python-mock
 
 Requires:      python2-devel
 Requires:      python-setuptools
+Requires: python-six
 
 %description
 Paver is a Python-based build/distribution/deployment scripting tool along the
@@ -60,6 +61,8 @@ now much easier.
 
 %patch0 -p1
 
+rm paver/deps/six*
+
 # Note: This falls somewhere in between source and non-source.  It's a copy
 # of the essential files from the library that's being packaged.  But it's
 # zipped up.  For us, the paver command should find the uninstalled paver
@@ -70,7 +73,8 @@ rm paver-minilib.zip
 %{__python} setup.py build
 
 %check
-nosetests
+# Disable the two cog tests as python-cog(app) is not packaged for Fedora
+nosetests -e test_cogging -e test_cogging_with_markers_removed
 
 %install
 rm -rf %{buildroot}
@@ -85,9 +89,17 @@ rm -rf %{buildroot}
 %doc LICENSE.txt README.rst
 %{_bindir}/*
 %{python_sitelib}/*
+%exclude %{python_sitelib}/paver/tests
 
 
 %changelog
+* Mon Feb 25 2013 Toshio Kuratomi <toshio at fedoraproject.org> - 1.2.0-1
+- Update to upstream 1.2.0 release
+- samefile patch merged upstream
+- Patch to unbundle included python-six
+- Disable cog as it's not packaged yet
+- Remove the unittests from the binary rpm
+
 * Thu Jan 10 2013 Toshio Kuratomi <toshio at fedoraproject.org> - 1.1.1-2
 - Fix paver's use of os.path.samefile
 
diff --git a/sources b/sources
index af35c8c..c2ad7e0 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-dcc0d1ffa052a8b8f5efcd781a841c26  Paver-1.1.1.tar.gz
+96d5c962347a47590626aad2bf7a34a0  Paver-1.2.0.tar.gz


More information about the scm-commits mailing list