Hello community,

here is the log from the commit of package python-pbr for openSUSE:Factory 
checked in at 2015-08-14 14:45:47
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-pbr (Old)
 and      /work/SRC/openSUSE:Factory/.python-pbr.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "python-pbr"

Changes:
--------
--- /work/SRC/openSUSE:Factory/python-pbr/python-pbr-doc.changes        
2015-08-07 00:23:15.000000000 +0200
+++ /work/SRC/openSUSE:Factory/.python-pbr.new/python-pbr-doc.changes   
2015-08-14 14:45:52.000000000 +0200
@@ -1,0 +2,11 @@
+Tue Aug 11 07:34:34 UTC 2015 - seife+...@b1-systems.com
+
+- update to version 1.4.0
+  * Fix docs for environment markers in extras
+  * Export ChangeLog and AUTHORS in install
+  * Show how long the git querying takes
+  * Add wsgi_scripts support to PBR
+  * Updated from global requirements
+- requires python-mock >= 1.2
+
+-------------------------------------------------------------------
--- /work/SRC/openSUSE:Factory/python-pbr/python-pbr.changes    2015-08-07 
00:23:15.000000000 +0200
+++ /work/SRC/openSUSE:Factory/.python-pbr.new/python-pbr.changes       
2015-08-14 14:45:52.000000000 +0200
@@ -1,0 +2,17 @@
+Wed Aug 12 09:32:35 UTC 2015 - dmuel...@suse.com
+
+- add 0001-Handle-git-being-entirely-absent.patch
+- revert dependency on git (see comment in the specfile)
+
+-------------------------------------------------------------------
+Tue Aug 11 07:34:34 UTC 2015 - seife+...@b1-systems.com
+
+- update to version 1.4.0
+  * Fix docs for environment markers in extras
+  * Export ChangeLog and AUTHORS in install
+  * Show how long the git querying takes
+  * Add wsgi_scripts support to PBR
+  * Updated from global requirements
+- requires python-mock >= 1.2
+
+-------------------------------------------------------------------

Old:
----
  pbr-1.3.0.tar.gz

New:
----
  0001-Handle-git-being-entirely-absent.patch
  pbr-1.4.0.tar.gz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ python-pbr-doc.spec ++++++
--- /var/tmp/diff_new_pack.WRtVhn/_old  2015-08-14 14:45:53.000000000 +0200
+++ /var/tmp/diff_new_pack.WRtVhn/_new  2015-08-14 14:45:53.000000000 +0200
@@ -17,7 +17,7 @@
 
 
 Name:           python-pbr-doc
-Version:        1.3.0
+Version:        1.4.0
 Release:        0
 Summary:        Documentation for python-pbr
 License:        Apache-2.0

++++++ python-pbr.spec ++++++
--- /var/tmp/diff_new_pack.WRtVhn/_old  2015-08-14 14:45:53.000000000 +0200
+++ /var/tmp/diff_new_pack.WRtVhn/_new  2015-08-14 14:45:53.000000000 +0200
@@ -21,7 +21,7 @@
 %bcond_with test
 
 Name:           python-pbr
-Version:        1.3.0
+Version:        1.4.0
 Release:        0
 Summary:        Python Build Reasonableness
 License:        Apache-2.0
@@ -32,6 +32,7 @@
 # NOTE(toabctl): this is currently in review: 
https://review.openstack.org/#/c/193462/
 # needed to be abe to use pbr with newer Sphinx versions
 Patch0:         0001-Remove-sphinx_config.init_values-manual-call.patch
+Patch1:         0001-Handle-git-being-entirely-absent.patch
 BuildRequires:  fdupes
 BuildRequires:  python-devel
 BuildRequires:  python-pip >= 1.4
@@ -43,7 +44,7 @@
 %endif
 BuildRequires:  python-fixtures >= 0.3.14
 BuildRequires:  python-hacking >= 0.9.2
-BuildRequires:  python-mock >= 1.0
+BuildRequires:  python-mock >= 1.2
 BuildRequires:  python-python-subunit >= 0.0.18
 BuildRequires:  python-testrepository >= 0.0.18
 BuildRequires:  python-testresources >= 0.2.4
@@ -70,6 +71,7 @@
 %prep
 %setup -q -n pbr-%{version}
 %patch0 -p1
+%patch1 -p1
 # Get rid of ugly build-time deps that require network:
 sed -i "s/, 'sphinx\.ext\.intersphinx'//" doc/source/conf.py
 

++++++ 0001-Handle-git-being-entirely-absent.patch ++++++
>From 5c0bb9186fe2d65901744b00af24c8c50b3e1d29 Mon Sep 17 00:00:00 2001
From: Robert Collins <rbtcoll...@hp.com>
Date: Mon, 10 Aug 2015 16:22:26 +1200
Subject: [PATCH] Handle git being entirely absent

When we try to find the git directory, if git is not present, treat
that the same as an error from git itself. Sadly tests for this are
nearly impossible to meaningfully write, since we always have git
installed. I can do a mock based test if folk want one.

Change-Id: If6160d1fb3def8133bdd0b66105e60ef93f80f82
Closes-Bug: #1481468
---
 pbr/git.py | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/pbr/git.py b/pbr/git.py
index b4ae300..60acd3c 100644
--- a/pbr/git.py
+++ b/pbr/git.py
@@ -18,6 +18,7 @@ from __future__ import unicode_literals
 
 import distutils.errors
 from distutils import log
+import errno
 import io
 import os
 import re
@@ -64,7 +65,13 @@ def _run_git_command(cmd, git_dir, **kwargs):
 
 
 def _get_git_directory():
-    return _run_shell_command(['git', 'rev-parse', '--git-dir'])
+    try:
+        return _run_shell_command(['git', 'rev-parse', '--git-dir'])
+    except OSError as e:
+        if e.errno == errno.ENOENT:
+            # git not installed.
+            return ''
+        raise
 
 
 def _git_is_installed():
-- 
2.4.6

++++++ pbr-1.3.0.tar.gz -> pbr-1.4.0.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pbr-1.3.0/AUTHORS new/pbr-1.4.0/AUTHORS
--- old/pbr-1.3.0/AUTHORS       2015-07-10 23:32:49.000000000 +0200
+++ new/pbr-1.4.0/AUTHORS       2015-08-03 21:59:53.000000000 +0200
@@ -7,6 +7,7 @@
 Attila Fazekas <afaze...@redhat.com>
 Ben Nemec <bne...@redhat.com>
 Bhuvan Arumugam <bhu...@apache.org>
+Brant Knudson <bknud...@us.ibm.com>
 Brian Waldon <bcwal...@gmail.com>
 Chang Bo Guo <guoc...@cn.ibm.com>
 ChangBo Guo(gcb) <eric....@easystack.cn>
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pbr-1.3.0/ChangeLog new/pbr-1.4.0/ChangeLog
--- old/pbr-1.3.0/ChangeLog     2015-07-10 23:32:49.000000000 +0200
+++ new/pbr-1.4.0/ChangeLog     2015-08-03 21:59:53.000000000 +0200
@@ -1,6 +1,17 @@
 CHANGES
 =======
 
+1.4.0
+-----
+
+* Fix docs for environment markers in extras
+* Export ChangeLog and AUTHORS in install
+* Updated from global requirements
+* Updated from global requirements
+* Show how long the git querying takes
+* Add wsgi_scripts support to PBR
+* Updated from global requirements
+
 1.3.0
 -----
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pbr-1.3.0/PKG-INFO new/pbr-1.4.0/PKG-INFO
--- old/pbr-1.3.0/PKG-INFO      2015-07-10 23:32:49.000000000 +0200
+++ new/pbr-1.4.0/PKG-INFO      2015-08-03 21:59:53.000000000 +0200
@@ -1,6 +1,6 @@
 Metadata-Version: 1.1
 Name: pbr
-Version: 1.3.0
+Version: 1.4.0
 Summary: Python Build Reasonableness
 Home-page: https://launchpad.net/pbr
 Author: OpenStack
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pbr-1.3.0/doc/source/index.rst 
new/pbr-1.4.0/doc/source/index.rst
--- old/pbr-1.3.0/doc/source/index.rst  2015-07-10 23:32:31.000000000 +0200
+++ new/pbr-1.4.0/doc/source/index.rst  2015-08-03 21:59:33.000000000 +0200
@@ -159,10 +159,10 @@
     [extras]
     security =
         aleph
-        bet :python_environment=='3.2'
-        gimel :python_environment=='2.7'
+        bet:python_version=='3.2'
+        gimel:python_version=='2.7'
     testing =
-        quux :python_environment=='2.7'
+        quux:python_version=='2.7'
 
 long_description
 ----------------
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pbr-1.3.0/pbr/git.py new/pbr-1.4.0/pbr/git.py
--- old/pbr-1.3.0/pbr/git.py    2015-07-10 23:32:30.000000000 +0200
+++ new/pbr-1.4.0/pbr/git.py    2015-08-03 21:59:33.000000000 +0200
@@ -22,6 +22,7 @@
 import os
 import re
 import subprocess
+import time
 
 import pkg_resources
 
@@ -221,6 +222,7 @@
 def write_git_changelog(git_dir=None, dest_dir=os.path.curdir,
                         option_dict=dict(), changelog=None):
     """Write a changelog based on the git changelog."""
+    start = time.time()
     if not changelog:
         changelog = _iter_log_oneline(git_dir=git_dir, option_dict=option_dict)
         if changelog:
@@ -236,6 +238,8 @@
     with io.open(new_changelog, "w", encoding="utf-8") as changelog_file:
         for release, content in changelog:
             changelog_file.write(content)
+    stop = time.time()
+    log.info('[pbr] ChangeLog complete (%0.1fs)' % (stop - start))
 
 
 def generate_authors(git_dir=None, dest_dir='.', option_dict=dict()):
@@ -244,6 +248,7 @@
                                              'SKIP_GENERATE_AUTHORS')
     if should_skip:
         return
+    start = time.time()
     old_authors = os.path.join(dest_dir, 'AUTHORS.in')
     new_authors = os.path.join(dest_dir, 'AUTHORS')
     # If there's already an AUTHORS file and it's not writable, just use it
@@ -278,3 +283,5 @@
                     new_authors_fh.write(old_authors_fh.read())
             new_authors_fh.write(('\n'.join(authors) + '\n')
                                  .encode('utf-8'))
+    stop = time.time()
+    log.info('[pbr] AUTHORS complete (%0.1fs)' % (stop - start))
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pbr-1.3.0/pbr/hooks/commands.py 
new/pbr-1.4.0/pbr/hooks/commands.py
--- old/pbr-1.3.0/pbr/hooks/commands.py 2015-07-10 23:32:30.000000000 +0200
+++ new/pbr-1.4.0/pbr/hooks/commands.py 2015-08-03 21:59:33.000000000 +0200
@@ -61,3 +61,5 @@
         # We always want non-egg install unless explicitly requested
         if 'manpages' in self.pbr_config or not use_egg:
             self.add_command('pbr.packaging.LocalInstall')
+        else:
+            self.add_command('pbr.packaging.InstallWithGit')
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pbr-1.3.0/pbr/packaging.py 
new/pbr-1.4.0/pbr/packaging.py
--- old/pbr-1.3.0/pbr/packaging.py      2015-07-10 23:32:30.000000000 +0200
+++ new/pbr-1.4.0/pbr/packaging.py      2015-08-03 21:59:33.000000000 +0200
@@ -163,6 +163,20 @@
     return dependency_links
 
 
+class InstallWithGit(install.install):
+    """Extracts ChangeLog and AUTHORS from git then installs.
+
+    This is useful for e.g. readthedocs where the package is
+    installed and then docs built.
+    """
+
+    command_name = 'install'
+
+    def run(self):
+        _from_git(self.distribution)
+        return install.install.run(self)
+
+
 class LocalInstall(install.install):
     """Runs python setup.py install in a sensible manner.
 
@@ -174,6 +188,7 @@
     command_name = 'install'
 
     def run(self):
+        _from_git(self.distribution)
         return du_install.install.run(self)
 
 
@@ -212,6 +227,36 @@
 def have_nose():
     return _have_nose
 
+_wsgi_text = """#PBR Generated from %(group)r
+
+from %(module_name)s import %(import_target)s
+
+if __name__ == "__main__":
+    import argparse
+    import socket
+    import wsgiref.simple_server as wss
+
+    my_ip = socket.gethostbyname(socket.gethostname())
+    parser = argparse.ArgumentParser(
+        description=%(import_target)s.__doc__,
+        formatter_class=argparse.ArgumentDefaultsHelpFormatter)
+    parser.add_argument('--port', '-p', type=int, default=8000,
+                        help='TCP port to listen on')
+    args = parser.parse_args()
+    server = wss.make_server('', args.port, %(invoke_target)s())
+
+    print("*" * 80)
+    print("STARTING test server %(module_name)s.%(invoke_target)s")
+    url = "http://%%s:%%d/"; %% (my_ip, server.server_port)
+    print("Available at %%s" %% url)
+    print("DANGER! For testing only, do not use in production")
+    print("*" * 80)
+
+    server.serve_forever()
+else:
+    application = %(invoke_target)s()
+
+"""
 
 _script_text = """# PBR Generated from %(group)r
 
@@ -225,16 +270,25 @@
 """
 
 
+# the following allows us to specify different templates per entry
+# point group when generating pbr scripts.
+ENTRY_POINTS_MAP = {
+    'console_scripts': _script_text,
+    'gui_scripts': _script_text,
+    'wsgi_scripts': _wsgi_text
+}
+
+
 def override_get_script_args(
         dist, executable=os.path.normpath(sys.executable), is_wininst=False):
     """Override entrypoints console_script."""
     header = easy_install.get_script_header("", executable, is_wininst)
-    for group in 'console_scripts', 'gui_scripts':
+    for group, template in ENTRY_POINTS_MAP.items():
         for name, ep in dist.get_entry_map(group).items():
             if not ep.attrs or len(ep.attrs) > 2:
                 raise ValueError("Script targets must be of the form "
                                  "'func' or 'Class.class_method'.")
-            script_text = _script_text % dict(
+            script_text = template % dict(
                 group=group,
                 module_name=ep.module_name,
                 import_target=ep.attrs[0],
@@ -358,18 +412,22 @@
                 self.filelist.append(entry)
 
 
+def _from_git(distribution):
+    option_dict = distribution.get_option_dict('pbr')
+    changelog = git._iter_log_oneline(option_dict=option_dict)
+    if changelog:
+        changelog = git._iter_changelog(changelog)
+    git.write_git_changelog(option_dict=option_dict, changelog=changelog)
+    git.generate_authors(option_dict=option_dict)
+
+
 class LocalSDist(sdist.sdist):
     """Builds the ChangeLog and Authors files from VC first."""
 
     command_name = 'sdist'
 
     def run(self):
-        option_dict = self.distribution.get_option_dict('pbr')
-        changelog = git._iter_log_oneline(option_dict=option_dict)
-        if changelog:
-            changelog = git._iter_changelog(changelog)
-        git.write_git_changelog(option_dict=option_dict, changelog=changelog)
-        git.generate_authors(option_dict=option_dict)
+        _from_git(self.distribution)
         # sdist.sdist is an old style class, can't use super()
         sdist.sdist.run(self)
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pbr-1.3.0/pbr/tests/test_packaging.py 
new/pbr-1.4.0/pbr/tests/test_packaging.py
--- old/pbr-1.3.0/pbr/tests/test_packaging.py   2015-07-10 23:32:31.000000000 
+0200
+++ new/pbr-1.4.0/pbr/tests/test_packaging.py   2015-08-03 21:59:33.000000000 
+0200
@@ -156,21 +156,23 @@
         super(TestPackagingInGitRepoWithCommit, self).setUp()
         repo = self.useFixture(TestRepo(self.package_dir))
         repo.commit()
-        self.run_setup('sdist', allow_fail=False)
 
     def test_authors(self):
+        self.run_setup('sdist', allow_fail=False)
         # One commit, something should be in the authors list
         with open(os.path.join(self.package_dir, 'AUTHORS'), 'r') as f:
             body = f.read()
         self.assertNotEqual(body, '')
 
     def test_changelog(self):
+        self.run_setup('sdist', allow_fail=False)
         with open(os.path.join(self.package_dir, 'ChangeLog'), 'r') as f:
             body = f.read()
         # One commit, something should be in the ChangeLog list
         self.assertNotEqual(body, '')
 
     def test_manifest_exclude_honoured(self):
+        self.run_setup('sdist', allow_fail=False)
         with open(os.path.join(
                 self.package_dir,
                 'pbr_testpackage.egg-info/SOURCES.txt'), 'r') as f:
@@ -179,6 +181,12 @@
             body, matchers.Not(matchers.Contains('pbr_testpackage/extra.py')))
         self.assertThat(body, matchers.Contains('pbr_testpackage/__init__.py'))
 
+    def test_install_writes_changelog(self):
+        stdout, _, _ = self.run_setup(
+            'install', '--root', self.temp_dir + 'installed',
+            allow_fail=False)
+        self.expectThat(stdout, matchers.Contains('Generating ChangeLog'))
+
 
 class TestPackagingInGitRepoWithoutCommit(base.BaseTestCase):
 
@@ -204,18 +212,26 @@
 
     def setUp(self):
         super(TestPackagingInPlainDirectory, self).setUp()
-        self.run_setup('sdist', allow_fail=False)
 
     def test_authors(self):
+        self.run_setup('sdist', allow_fail=False)
         # Not a git repo, no AUTHORS file created
         filename = os.path.join(self.package_dir, 'AUTHORS')
         self.assertFalse(os.path.exists(filename))
 
     def test_changelog(self):
+        self.run_setup('sdist', allow_fail=False)
         # Not a git repo, no ChangeLog created
         filename = os.path.join(self.package_dir, 'ChangeLog')
         self.assertFalse(os.path.exists(filename))
 
+    def test_install_no_ChangeLog(self):
+        stdout, _, _ = self.run_setup(
+            'install', '--root', self.temp_dir + 'installed',
+            allow_fail=False)
+        self.expectThat(
+            stdout, matchers.Not(matchers.Contains('Generating ChangeLog')))
+
 
 class TestPresenceOfGit(base.BaseTestCase):
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pbr-1.3.0/pbr/tests/test_wsgi.py 
new/pbr-1.4.0/pbr/tests/test_wsgi.py
--- old/pbr-1.3.0/pbr/tests/test_wsgi.py        1970-01-01 01:00:00.000000000 
+0100
+++ new/pbr-1.4.0/pbr/tests/test_wsgi.py        2015-08-03 21:59:33.000000000 
+0200
@@ -0,0 +1,171 @@
+# Copyright (c) 2015 Hewlett-Packard Development Company, L.P. (HP)
+#
+# Licensed under the Apache License, Version 2.0 (the "License"); you may
+# not use this file except in compliance with the License. You may obtain
+# a copy of the License at
+#
+#      http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+# License for the specific language governing permissions and limitations
+# under the License.
+
+import os
+import re
+import subprocess
+import sys
+import tempfile
+import time
+try:
+    # python 2
+    from urllib2 import urlopen
+except ImportError:
+    # python 3
+    from urllib.request import urlopen
+
+import fixtures
+
+from pbr.tests import base
+
+
+class TestWsgiScripts(base.BaseTestCase):
+
+    cmd_names = ('pbr_test_wsgi', 'pbr_test_wsgi_with_class')
+
+    def test_wsgi_script_install(self):
+        """Test that we install a non-pkg-resources wsgi script."""
+        if os.name == 'nt':
+            self.skipTest('Windows support is passthrough')
+
+        stdout, _, return_code = self.run_setup(
+            'install', '--prefix=%s' % self.temp_dir)
+
+        self.useFixture(
+            fixtures.EnvironmentVariable(
+                'PYTHONPATH', ".:%s/lib/python%s.%s/site-packages" % (
+                    self.temp_dir,
+                    sys.version_info[0],
+                    sys.version_info[1])))
+
+        self._check_wsgi_install_content(stdout)
+
+    def test_wsgi_script_run(self):
+        """Test that we install a runnable wsgi script.
+
+        This test actually attempts to start and interact with the
+        wsgi script in question to demonstrate that it's a working
+        wsgi script using simple server. It's a bit hokey because of
+        process management that has to be done.
+
+        """
+        self.skipTest("Test skipped until we can determine a reliable "
+                      "way to capture subprocess stdout without blocking")
+
+        if os.name == 'nt':
+            self.skipTest('Windows support is passthrough')
+
+        stdout, _, return_code = self.run_setup(
+            'install', '--prefix=%s' % self.temp_dir)
+
+        self.useFixture(
+            fixtures.EnvironmentVariable(
+                'PYTHONPATH', ".:%s/lib/python%s.%s/site-packages" % (
+                    self.temp_dir,
+                    sys.version_info[0],
+                    sys.version_info[1])))
+        # NOTE(sdague): making python unbuffered is critical to
+        # getting output out of the subprocess.
+        self.useFixture(
+            fixtures.EnvironmentVariable(
+                'PYTHONUNBUFFERED', '1'))
+
+        self._check_wsgi_install_content(stdout)
+
+        # Live test run the scripts and see that they respond to wsgi
+        # requests.
+        self._test_wsgi()
+
+    def _test_wsgi(self):
+        for cmd_name in self.cmd_names:
+            cmd = os.path.join(self.temp_dir, 'bin', cmd_name)
+            stdout = tempfile.NamedTemporaryFile()
+            print("Running %s > %s" % (cmd, stdout.name))
+            # NOTE(sdague): ok, this looks a little janky, and it
+            # is. However getting python to not hang with
+            # popen.communicate is beyond me.
+            #
+            # We're opening with a random port (so no conflicts), and
+            # redirecting all stdout and stderr to files. We can then
+            # safely read these files and not deadlock later in the
+            # test. This requires shell expansion.
+            p = subprocess.Popen(
+                "%s -p 0 > %s 2>&1" % (cmd, stdout.name),
+                shell=True,
+                close_fds=True,
+                cwd=self.temp_dir)
+
+            self.addCleanup(p.kill)
+
+            # the sleep is important to force a context switch to the
+            # subprocess
+            time.sleep(0.1)
+
+            stdoutdata = stdout.read()
+            self.assertIn(
+                "STARTING test server pbr_testpackage.wsgi",
+                stdoutdata)
+            self.assertIn(
+                "DANGER! For testing only, do not use in production",
+                stdoutdata)
+
+            m = re.search('(http://[^:]+:\d+)/', stdoutdata)
+            self.assertIsNotNone(m, "Regex failed to match on %s" % stdoutdata)
+
+            f = urlopen(m.group(1))
+            self.assertEqual("Hello World", f.read())
+
+            # the sleep is important to force a context switch to the
+            # subprocess
+            time.sleep(0.1)
+
+            # Kill off the child, it should force a flush of the stdout.
+            p.kill()
+            time.sleep(0.1)
+
+            stdoutdata = stdout.read()
+            # we should have logged an HTTP request, return code 200, that
+            # returned 11 bytes
+            self.assertIn('"GET / HTTP/1.1" 200 11', stdoutdata)
+
+    def _check_wsgi_install_content(self, install_stdout):
+        for cmd_name in self.cmd_names:
+            install_txt = 'Installing %s script to %s' % (cmd_name,
+                                                          self.temp_dir)
+            self.assertIn(install_txt, install_stdout)
+
+            cmd_filename = os.path.join(self.temp_dir, 'bin', cmd_name)
+
+            script_txt = open(cmd_filename, 'r').read()
+            self.assertNotIn('pkg_resources', script_txt)
+
+            main_block = """if __name__ == "__main__":
+    import argparse
+    import socket
+    import wsgiref.simple_server as wss"""
+
+            if cmd_name == 'pbr_test_wsgi':
+                app_name = "main"
+            else:
+                app_name = "WSGI.app"
+
+            starting_block = ("STARTING test server pbr_testpackage.wsgi."
+                              "%s" % app_name)
+
+            else_block = """else:
+    application = %s()""" % app_name
+
+            self.assertIn(main_block, script_txt)
+            self.assertIn(starting_block, script_txt)
+            self.assertIn(else_block, script_txt)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/pbr-1.3.0/pbr/tests/testpackage/pbr_testpackage/wsgi.py 
new/pbr-1.4.0/pbr/tests/testpackage/pbr_testpackage/wsgi.py
--- old/pbr-1.3.0/pbr/tests/testpackage/pbr_testpackage/wsgi.py 1970-01-01 
01:00:00.000000000 +0100
+++ new/pbr-1.4.0/pbr/tests/testpackage/pbr_testpackage/wsgi.py 2015-08-03 
21:59:33.000000000 +0200
@@ -0,0 +1,31 @@
+# Copyright (c) 2013 Hewlett-Packard Development Company, L.P.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#    http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+# implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+from __future__ import print_function
+
+
+def application(env, start_response):
+    start_response('200 OK', [('Content-Type', 'text/html')])
+    return ["Hello World"]
+
+
+def main():
+    return application
+
+
+class WSGI(object):
+
+    @classmethod
+    def app(self):
+        return application
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pbr-1.3.0/pbr/tests/testpackage/setup.cfg 
new/pbr-1.4.0/pbr/tests/testpackage/setup.cfg
--- old/pbr-1.3.0/pbr/tests/testpackage/setup.cfg       2015-07-10 
23:32:30.000000000 +0200
+++ new/pbr-1.4.0/pbr/tests/testpackage/setup.cfg       2015-08-03 
21:59:33.000000000 +0200
@@ -38,6 +38,10 @@
     pbr_test_cmd = pbr_testpackage.cmd:main
     pbr_test_cmd_with_class = pbr_testpackage.cmd:Foo.bar
 
+wsgi_scripts =
+    pbr_test_wsgi = pbr_testpackage.wsgi:main
+    pbr_test_wsgi_with_class = pbr_testpackage.wsgi:WSGI.app
+
 [extension=pbr_testpackage.testext]
 sources = src/testext.c
 optional = True
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pbr-1.3.0/pbr.egg-info/PKG-INFO 
new/pbr-1.4.0/pbr.egg-info/PKG-INFO
--- old/pbr-1.3.0/pbr.egg-info/PKG-INFO 2015-07-10 23:32:49.000000000 +0200
+++ new/pbr-1.4.0/pbr.egg-info/PKG-INFO 2015-08-03 21:59:53.000000000 +0200
@@ -1,6 +1,6 @@
 Metadata-Version: 1.1
 Name: pbr
-Version: 1.3.0
+Version: 1.4.0
 Summary: Python Build Reasonableness
 Home-page: https://launchpad.net/pbr
 Author: OpenStack
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pbr-1.3.0/pbr.egg-info/SOURCES.txt 
new/pbr-1.4.0/pbr.egg-info/SOURCES.txt
--- old/pbr-1.3.0/pbr.egg-info/SOURCES.txt      2015-07-10 23:32:49.000000000 
+0200
+++ new/pbr-1.4.0/pbr.egg-info/SOURCES.txt      2015-08-03 21:59:53.000000000 
+0200
@@ -64,6 +64,7 @@
 pbr/tests/test_setup.py
 pbr/tests/test_util.py
 pbr/tests/test_version.py
+pbr/tests/test_wsgi.py
 pbr/tests/util.py
 pbr/tests/testpackage/CHANGES.txt
 pbr/tests/testpackage/LICENSE.txt
@@ -81,6 +82,7 @@
 pbr/tests/testpackage/pbr_testpackage/_setup_hooks.py
 pbr/tests/testpackage/pbr_testpackage/cmd.py
 pbr/tests/testpackage/pbr_testpackage/extra.py
+pbr/tests/testpackage/pbr_testpackage/wsgi.py
 pbr/tests/testpackage/pbr_testpackage/package_data/1.txt
 pbr/tests/testpackage/pbr_testpackage/package_data/2.txt
 pbr/tests/testpackage/src/testext.c
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pbr-1.3.0/pbr.egg-info/pbr.json 
new/pbr-1.4.0/pbr.egg-info/pbr.json
--- old/pbr-1.3.0/pbr.egg-info/pbr.json 2015-07-10 23:32:49.000000000 +0200
+++ new/pbr-1.4.0/pbr.egg-info/pbr.json 2015-08-03 21:59:53.000000000 +0200
@@ -1 +1 @@
-{"git_version": "61a3a1e", "is_release": true}
\ No newline at end of file
+{"git_version": "1e4d883", "is_release": true}
\ No newline at end of file
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pbr-1.3.0/setup.cfg new/pbr-1.4.0/setup.cfg
--- old/pbr-1.3.0/setup.cfg     2015-07-10 23:32:49.000000000 +0200
+++ new/pbr-1.4.0/setup.cfg     2015-08-03 21:59:53.000000000 +0200
@@ -53,7 +53,7 @@
 universal = 1
 
 [egg_info]
+tag_date = 0
 tag_svn_revision = 0
 tag_build = 
-tag_date = 0
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pbr-1.3.0/test-requirements.txt 
new/pbr-1.4.0/test-requirements.txt
--- old/pbr-1.3.0/test-requirements.txt 2015-07-10 23:32:31.000000000 +0200
+++ new/pbr-1.4.0/test-requirements.txt 2015-08-03 21:59:33.000000000 +0200
@@ -5,8 +5,7 @@
 discover
 fixtures>=1.3.1
 hacking<0.11,>=0.10.0
-mock>=1.0;python_version!='2.6'
-mock==1.0.1;python_version=='2.6'
+mock>=1.2
 python-subunit>=0.0.18
 sphinx!=1.2.0,!=1.3b1,<1.3,>=1.1.2
 six>=1.9.0


Reply via email to