Hello community,
here is the log from the commit of package python-pbr for openSUSE:Factory checked in at 2013-12-03 10:49:53
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
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.changes 2013-08-13 10:52:14.000000000 +0200
+++ /work/SRC/openSUSE:Factory/.python-pbr.new/python-pbr.changes 2013-12-03 10:49:55.000000000 +0100
@@ -1,0 +2,14 @@
+Mon Nov 25 13:58:28 UTC 2013 - speilicke@suse.com
+
+- Update dependencies
+- Rename build-conditional to "test", avoid clash with Cloud:OpenStack:Master's
+ "tests" build-conditional. We've got other issues here
+- Add rpmlintrc, we have some C files as part of the testsuite
+
+-------------------------------------------------------------------
+Thu Oct 31 23:47:07 UTC 2013 - dmueller@suse.com
+
+- update to 0.5.23:
+ * Use dev based release versioning
+
+-------------------------------------------------------------------
Old:
----
pbr-0.5.21.tar.gz
New:
----
pbr-0.5.23.tar.gz
rpmlintrc
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ python-pbr.spec ++++++
--- /var/tmp/diff_new_pack.K2McHd/_old 2013-12-03 10:49:55.000000000 +0100
+++ /var/tmp/diff_new_pack.K2McHd/_new 2013-12-03 10:49:55.000000000 +0100
@@ -16,12 +16,12 @@
#
-# A build cycle exists between python-extras and python-testtools. Thus, only
+# NOTE(saschpe): git invocation and pythonpath issues with testrepository
# enable testing with a build conditional (off by default):
-%bcond_with tests
+%bcond_with test
Name: python-pbr
-Version: 0.5.21
+Version: 0.5.23
Release: 0
Summary: Python Build Reasonableness
License: Apache-2.0
@@ -30,25 +30,22 @@
Source: http://pypi.python.org/packages/source/p/pbr/pbr-%{version}.tar.gz
BuildRequires: python-devel
# Documentation requirements:
-BuildRequires: python-Sphinx
+BuildRequires: python-Sphinx >= 1.1.2
# Test requirements:
-%if %{with tests}
-BuildRequires: python-coverage >= 3.6
+%if %{with test}
+#BuildRequires: python-coverage >= 3.6
%if 0%{?suse_version} <= 1110
BuildRequires: python-discover
%endif
BuildRequires: python-fixtures >= 0.3.12
-BuildRequires: python-flake8
-BuildRequires: python-mox
-BuildRequires: python-nose
-BuildRequires: python-oslo.config
-BuildRequires: python-pip >= 1.0
-BuildRequires: python-python-mimeparse
+BuildRequires: python-flake8 >= 2.0
+#BuildRequires: python-pip >= 1.0
+#BuildRequires: python-python-mimeparse
BuildRequires: python-python-subunit
-BuildRequires: python-testrepository >= 0.0.13
+BuildRequires: python-testrepository >= 0.0.17
BuildRequires: python-testresources
-BuildRequires: python-testscenarios
-BuildRequires: python-testtools >= 0.9.27
+BuildRequires: python-testscenarios >= 0.4
+BuildRequires: python-testtools >= 0.9.32
%endif
Requires: python-pip >= 1.0
BuildRoot: %{_tmppath}/%{name}-%{version}-build
@@ -77,9 +74,9 @@
%install
python setup.py install --prefix=%{_prefix} --root=%{buildroot}
-%if %{with tests}
+%if %{with test}
%check
-python setup.py testr || true
+python setup.py testr
%endif
%files
++++++ pbr-0.5.21.tar.gz -> pbr-0.5.23.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pbr-0.5.21/AUTHORS new/pbr-0.5.23/AUTHORS
--- old/pbr-0.5.21/AUTHORS 2013-08-04 20:41:10.000000000 +0200
+++ new/pbr-0.5.23/AUTHORS 2013-10-30 22:02:56.000000000 +0100
@@ -22,6 +22,7 @@
Ionuț Arțăriși
Jason Kölker
Jay Pipes
+Jeremy Stanley
Joe Gordon
Joe Heck
Johannes Erdfelt
@@ -30,17 +31,22 @@
Mark McLoughlin
Mark Sienkiewicz
Maru Newby
+Matthew Treinish
Michael Basnight
Michael Still
Monty Taylor
+Nikhil Manchanda
Rajaram Mallya
Rick Harris
+Robert Collins
Robert Myers
Russell Bryant
+Ryan Petrello
Sean Dague
Sergey Lukjanov
Steven Hardy
Thomas Grainger
+Thomas Leaman
Tim Simpson
Vincent Untz
Vishvananda Ishaya
@@ -48,3 +54,4 @@
Yaguang Tang
Yuriy Taraday
Zhongyue Luo
+alexpilotti
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pbr-0.5.21/ChangeLog new/pbr-0.5.23/ChangeLog
--- old/pbr-0.5.21/ChangeLog 2013-08-04 20:41:09.000000000 +0200
+++ new/pbr-0.5.23/ChangeLog 2013-10-30 22:02:56.000000000 +0100
@@ -1,3 +1,336 @@
+commit 629bbce1c88a4a576182c7a41372a70a864d8226
+Author: Nikhil Manchanda
+Date: Wed Oct 30 03:08:48 2013 -0700
+
+ Fixed pbr install to not error out and fail if git is not installed
+
+ Fixed the issue where pbr was erroring out (file not found) when
+ running 'python setup.py egg_info' since it was trying to get the
+ .git directory even if git was not installed.
+
+ Closes bug 1245676
+
+ Change-Id: I31e1f86f10f18897774b49eb293aede31641db31
+
+commit e8a3c7e7ba4430870849ff34ab3437db2ed1f942
+Merge: a3a875b 1f730e2
+Author: Jenkins
+Date: Mon Oct 28 01:13:31 2013 +0000
+
+ Merge "Move base test case logic out of __init__.py"
+
+commit a3a875b1a0eee25344d8d6a8898ee176d3dc46b3
+Merge: 3fdedcf a7e5f91
+Author: Jenkins
+Date: Sun Oct 27 22:58:13 2013 +0000
+
+ Merge "Prevent ordereddict installation on 2.7"
+
+commit 1f730e25803c9a263c147c1a35415ee8b2b49e5e
+Author: Monty Taylor
+Date: Sun Sep 29 15:40:03 2013 -0400
+
+ Move base test case logic out of __init__.py
+
+ It's an antipattern to have functional code in an __init__.py. Move it
+ into base.py to be less anti.
+
+ Change-Id: Ib4db548b78e4e760d94099596a3c495a839836dc
+
+commit 3fdedcf69e6c175c242400c5982e1d4a7db9673e
+Author: Monty Taylor
+Date: Tue Sep 17 12:22:05 2013 -0500
+
+ Comply with pep440
+
+ pep440 indicates that development releases should mark themselves with
+ the devN specifier.
+
+ http://www.python.org/dev/peps/pep-0440/#developmental-releases
+
+ Instead of using aN as we are currently doing for automatically
+ generated versions, we should use the pep440 compliant devN form.
+
+ Change-Id: Ieeb5149f8b013e76621112593e0a5c0a64817e1f
+
+commit a7e5f91d90b8a9205ed2a3b014a1bbc803aa4ada
+Author: Thomas Leaman
+Date: Wed Oct 16 16:07:25 2013 +0000
+
+ Prevent ordereddict installation on 2.7
+
+ This supports https://review.openstack.org/#/c/48475/ in glance
+ to remove copy/pasted ordereddict code.
+
+ Change-Id: I9b0a2588c6e7da86c048698c5e6dfe37ced4dd7f
+
+commit ae25b565d37c831d4caea8347a6ba6279683fbca
+Author: Doug Hellmann
+Date: Wed Sep 25 16:55:49 2013 -0400
+
+ Do not pass unicode where byte strings are wanted
+
+ Some versions of the tarfile module break when unicode data is
+ passed as metadata (like the version). See
+ http://bugs.python.org/issue11638 for details.
+
+ This change ensures that version number is always a byte strings
+ under python 2, where the problem exists.
+
+ Change-Id: Ic266cd7cce0394d28794ee61afe269f1296be2a2
+
+commit 3391ca5c1a9a1db4e96e0043b953d0b5d463d7fd
+Merge: 9fbbb2b d322c34
+Author: Jenkins
+Date: Wed Oct 9 16:00:52 2013 +0000
+
+ Merge "Rework run_shell_command"
+
+commit 9fbbb2b8871e654048dbbe46347d49d8230e8a26
+Merge: 403c2ba 0ff4fe1
+Author: Jenkins
+Date: Wed Oct 9 16:00:39 2013 +0000
+
+ Merge "Add a test for command registration."
+
+commit 403c2ba4668f04739adc608f3538c5c91c5be28b
+Merge: 517ce12 2f74b46
+Author: Jenkins
+Date: Wed Oct 9 11:05:18 2013 +0000
+
+ Merge "Switch away from tearDown for BaseTests."
+
+commit 517ce12c8d47e84b53da98b58a5c9035bfeca3d0
+Merge: 42b49cb 55f7642
+Author: Jenkins
+Date: Wed Oct 9 04:45:20 2013 +0000
+
+ Merge "Fix test_changelog when git isn't globally setup."
+
+commit 42b49cbad0d7ae57da72513690e940cd9765f68f
+Author: Jeremy Stanley
+Date: Mon Oct 7 23:31:27 2013 +0000
+
+ Get rid of PyPI URL override in integration test
+
+ * tools/integration.sh: Overriding the PyPI URL is logic best left
+ to devstack-gate since it does those things already. Remove the
+ similar dance found here.
+
+ Change-Id: Ie2fcabb11b30dc3ab6564bdedd55b2b173c1bf2a
+
+commit 0ff4fe1a7619c289bc10e4905f1627d12a229e4a
+Author: Robert Collins
+Date: Sun Sep 29 21:58:26 2013 +1300
+
+ Add a test for command registration.
+
+ This would be better as a direct unit test, but I can't see where
+ thats done; and setuptools doesn't seem super friendly to that.
+
+ There are more commands that can be tested, but this seemed like a
+ good place to start.
+
+ Change-Id: I433880d9b08d07de0194450bbc90a423554e347c
+
+commit 2f74b467dd08ad63bce693379913c23a5f5e6785
+Author: Robert Collins
+Date: Sun Sep 29 21:44:47 2013 +1300
+
+ Switch away from tearDown for BaseTests.
+
+ tearDown is never the right hammer.
+
+ Change-Id: If17ae653e25d4fba2b768cb569a573467448ccef
+
+commit 55f76425fa082373be32bcf9df33ef81bbef0f4c
+Author: Robert Collins
+Date: Sun Sep 29 20:53:13 2013 +1300
+
+ Fix test_changelog when git isn't globally setup.
+
+ This test was assuming that it was possible to make a new git repo and
+ commit to it, but some versions of git will error if no user email is
+ set, and some users choose not to have that set globally.
+
+ Change-Id: I94401c4fe716021c2cb2f1585690463746c740c9
+
+commit d322c34fec2a7096203eba762d93b478a89cebe6
+Author: Monty Taylor
+Date: Thu Aug 15 19:22:33 2013 -0300
+
+ Rework run_shell_command
+
+ A previous patch for windows support made the simple case of passing a
+ string to run_shell_command complicated with quoting. Clean that up by
+ reverting to list, which avoids the crazy quoting we had to do.
+
+ Change-Id: Ia3b8ac6a57e7400d0aab0d5265c851e536fb4e87
+
+commit 9f04dba0ecc07a33dc4b256bec4f860c30b2b500
+Author: Monty Taylor
+Date: Sat Sep 21 20:03:19 2013 -0400
+
+ Update tox config to use latest upgrades
+
+ Change-Id: I3b9e627eecc5b805db3fed2ae9571ccfc3dbd6fc
+
+commit 2f0b291bb9573e5cf61f3dd697a340f7995e47a5
+Merge: 3fbf36e 9786042
+Author: Jenkins
+Date: Sat Sep 7 04:31:32 2013 +0000
+
+ Merge "Add a hint for users who don't have git installed."
+
+commit 9786042aebf7b5117f49773ab9e6fb59f5e1bb8d
+Author: Ryan Petrello
+Date: Fri Sep 6 18:18:05 2013 -0400
+
+ Add a hint for users who don't have git installed.
+
+ Change-Id: I31058752e8303beab3f21dd590459e9a8a7c2334
+
+commit 3fbf36ef476e2ee6a368297a6300389ddfc590b0
+Author: Julien Danjou
+Date: Mon Aug 26 23:01:37 2013 +0200
+
+ Add pypy to tox.ini
+
+ Change-Id: I590af708465e8a8a3d5d5f64cc4ad1a9d640abc7
+
+commit ed63f50aacb19d1a276fc4329bf8cc4e4ab5717a
+Merge: 84614d3 0c33086
+Author: Jenkins
+Date: Thu Aug 15 07:55:55 2013 +0000
+
+ Merge "Sync requirements with global requirements"
+
+commit 84614d3cad00b450f770a9b4659937e9f5502f3d
+Merge: c8e6d0b aaad8e4
+Author: Jenkins
+Date: Wed Aug 14 21:57:11 2013 +0000
+
+ Merge "Fix python-ldap mirroring."
+
+commit c8e6d0b2651f2268d6dd6b1359dc61f05344e3af
+Merge: 24ee68c 00f878c
+Author: Jenkins
+Date: Wed Aug 14 21:54:10 2013 +0000
+
+ Merge "Stop checking periods in commit messages"
+
+commit 24ee68c226233bd305a94939f601de2ffb004961
+Merge: e2821d1 091b774
+Author: Jenkins
+Date: Wed Aug 14 21:54:08 2013 +0000
+
+ Merge "Fixes issue with command escaping on Windows"
+
+commit aaad8e451119a5732beb3bcd66d3f17e65bad5cc
+Author: Robert Collins
+Date: Thu Aug 8 09:01:09 2013 +1200
+
+ Fix python-ldap mirroring.
+
+ python-ldap wants ldap headers to compile.
+
+ Change-Id: I57dc54a3b745702ee8c1f8f8f91fc4ef1aa169fd
+
+commit 00f878c557942dfd8c4024c61aa63a7400336519
+Author: Robert Collins
+Date: Thu Aug 8 22:36:40 2013 +1200
+
+ Stop checking periods in commit messages
+
+ This breaks various peoples fingers and there was no overwhelming
+ community support, nor historical evidence, for enforcing the proposed
+ rule in either direction.
+
+ Change-Id: Id2a5af9bb8a49af0a2f94b38a8e7d5ef1208e627
+
+commit 091b774f0cf4b4e8bad7f5e04f88b53ac88b5227
+Author: alexpilotti
+Date: Sun Aug 11 07:25:14 2013 +0300
+
+ Fixes issue with command escaping on Windows
+
+ Fixes bug: #1210912
+
+ Special characters like <, > or ' need to be escaped on Windows when used
+ with "cmd /C <command>" as implemented in _run_shell_command
+
+ In order to avoid escaping issues, shell spawning has been replaced with
+ direct command execution. As a consequence, grep/egrep command pipes have
+ been replaced with Python regular expressions where appropriate.
+
+ Change-Id: Idd50fd24f300bce655f99d42cb96e37d29d4cb14
+
+commit e2821d16e70bbcdc920265c0762bcc70101b7160
+Merge: 9234efa 91cacee
+Author: Jenkins
+Date: Sun Aug 11 16:54:33 2013 +0000
+
+ Merge "Add option to run testr serially"
+
+commit 9234efaff21a1d882db38f87fe0c0dc9c804b0f6
+Merge: d467f99 fb0aabc
+Author: Jenkins
+Date: Sun Aug 11 16:51:20 2013 +0000
+
+ Merge "Fix pep8 error"
+
+commit d467f99b73385ed919bdb2121564d6a24d9d4fa7
+Author: Monty Taylor
+Date: Fri Aug 9 11:50:01 2013 -0300
+
+ Added documentation for packagers
+
+ There are several features aimed at distro packagers that it's probably
+ a good idea to tell them about.
+
+ Change-Id: Ide4ec3b94c5da644c5a4d5eee6629f42f7b508ac
+
+commit cb4a30bdc690abed44a940fbcff4cb945631325b
+Author: Monty Taylor
+Date: Fri Aug 9 11:30:03 2013 -0300
+
+ Update requirements in integration test
+
+ So that we don't test combinations of things that we won't see in the
+ gate, run the same requirements sync job that devstack does.
+
+ Change-Id: I0ee375b4e41aa214acf4cd3bfeb1b3a8ccb08dff
+
+commit 0c330868ec037033258196932961f440f4d2d393
+Author: Monty Taylor
+Date: Thu Aug 8 11:20:22 2013 -0300
+
+ Sync requirements with global requirements
+
+ Change-Id: Id8ffb22f4ecb05b9f8494be70d4587453a334efb
+
+commit fb0aabc97d64958799fd4a19994ac43d2632fb60
+Author: Monty Taylor
+Date: Thu Aug 8 11:18:53 2013 -0300
+
+ Fix pep8 error
+
+ I have no idea how this wasn't happening before but now is.
+
+ Change-Id: I3a9c82d58d9a89d31711efbdd30324888f343e3a
+
+commit 91caceed9c7a311253d5e593bf6053b94e8eb693
+Author: Matthew Treinish
+Date: Thu Aug 1 17:30:17 2013 -0400
+
+ Add option to run testr serially
+
+ This commit adds a new serial option to testr_command.py that when
+ set will run testr serially instead of running testr with the
+ '--parallel' flag.
+
+ Change-Id: Id49b105dc921e9acdef1a94d933719ad3a772c81
+
commit 270594f4e12dd3d2ce94e2e32128d72aba490cd6
Merge: 8e92bb2 d26d430
Author: Jenkins
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pbr-0.5.21/PKG-INFO new/pbr-0.5.23/PKG-INFO
--- old/pbr-0.5.21/PKG-INFO 2013-08-04 20:41:10.000000000 +0200
+++ new/pbr-0.5.23/PKG-INFO 2013-10-30 22:02:56.000000000 +0100
@@ -1,6 +1,6 @@
Metadata-Version: 1.1
Name: pbr
-Version: 0.5.21
+Version: 0.5.23
Summary: Python Build Reasonableness
Home-page: http://pypi.python.org/pypi/pbr
Author: OpenStack
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pbr-0.5.21/doc/source/index.rst new/pbr-0.5.23/doc/source/index.rst
--- old/pbr-0.5.21/doc/source/index.rst 2013-08-04 20:40:39.000000000 +0200
+++ new/pbr-0.5.23/doc/source/index.rst 2013-10-30 22:02:32.000000000 +0100
@@ -191,6 +191,14 @@
`Plain` class in `pbr.cfg.driver` and one called `fancy` which maps to the
`Fancy` class in `pbr.cfg.driver`.
+Packager Notes
+==============
+
+.. toctree::
+ :maxdepth: 1
+
+ packagers
+
Indices and tables
==================
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pbr-0.5.21/doc/source/packagers.rst new/pbr-0.5.23/doc/source/packagers.rst
--- old/pbr-0.5.21/doc/source/packagers.rst 1970-01-01 01:00:00.000000000 +0100
+++ new/pbr-0.5.23/doc/source/packagers.rst 2013-10-30 22:02:32.000000000 +0100
@@ -0,0 +1,59 @@
+=====================
+ Notes for Packagers
+=====================
+
+If you are maintaining packages of software that uses `pbr`, there are some
+features you probably want to be aware of that can make your life easier.
+They are exposed by environment variables, so adding them to rules or spec
+files should be fairly easy.
+
+Versioning
+==========
+
+`pbr`, when run in a git repo, derives the version of a package from the
+git tags. When run in a tarball with a proper egg-info dir, it will happily
+pull the version from that. So for the most part, the packager shouldn't need
+to care. However, if you are doing something like keeping a git repo with
+the sources and the packaging intermixed and it's causing pbr to get confused
+about whether its in its own git repo or not, you can set `PBR_VERSION`:
+
+::
+
+ PBR_VERSION=1.2.3
+
+and all version calculation logic will be completely skipped and the supplied
+version will be considered absolute.
+
+Dependencies
+============
+
+`pbr` overrides almost everything having to do with python dependency
+resolution and calls out to `pip`. In the python source package world this
+leads to a more consistent experience. However, in the distro packaging world,
+dependencies are handled by the distro. Setting `SKIP_PIP_INSTALL`:
+
+::
+
+ SKIP_PIP_INSTALL=1
+
+will cause all logic around use of `pip` to be skipped, including the logic
+that includes pip as a dependency of `pbr` itself.
+
+Tarballs
+========
+
+`pbr` includes everything in a source tarball that is in the original `git`
+repository. This can again cause havoc if a packager is doing fancy things
+with combined `git` repos, and is generating a source tarball using `python
+setup.py sdist` from that repo. If that is the workflow the packager is using,
+setting `SKIP_GIT_SDIST`:
+
+::
+
+ SKIP_GIT_SDIST=1
+
+will cause all logic around using git to find the files that should be in the
+source tarball to be skipped. Beware though, that because `pbr` packages
+automatically find all of the files, most of them do not have a complete
+`MANIFEST.in` file, so its possible that a tarball produced in that way will
+be missing files.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pbr-0.5.21/pbr/packaging.py new/pbr-0.5.23/pbr/packaging.py
--- old/pbr-0.5.21/pbr/packaging.py 2013-08-04 20:40:39.000000000 +0200
+++ new/pbr-0.5.23/pbr/packaging.py 2013-10-30 22:02:32.000000000 +0100
@@ -49,7 +49,7 @@
TEST_REQUIREMENTS_FILES = ('test-requirements.txt', 'tools/test-requires')
# part of the standard library starting with 2.7
# adding it to the requirements list screws distro installs
-BROKEN_ON_27 = ('argparse', 'importlib')
+BROKEN_ON_27 = ('argparse', 'importlib', 'ordereddict')
def get_requirements_files():
@@ -81,33 +81,25 @@
return mapping
-def _wrap_in_quotes(values):
- return ["'%s'" % value for value in values]
-
-
-def _make_links_args(links):
- return ["-f '%s'" % link for link in links]
-
-
def _pip_install(links, requires, root=None, option_dict=dict()):
if get_boolean_option(
option_dict, 'skip_pip_install', 'SKIP_PIP_INSTALL'):
return
- root_cmd = ""
+ cmd = [sys.executable, '-m', 'pip.__init__', 'install']
if root:
- root_cmd = "--root=%s" % root
+ cmd.append("--root=%s" % root)
+ for link in links:
+ cmd.append("-f")
+ cmd.append(link)
_run_shell_command(
- "%s -m pip.__init__ install %s %s %s" % (
- sys.executable,
- root_cmd,
- " ".join(links),
- " ".join(_wrap_in_quotes(requires))),
+ cmd + requires,
throw_on_error=True, buffer=False)
def read_git_mailmap(root_dir=None, mailmap='.mailmap'):
if not root_dir:
- root_dir = _run_shell_command('git rev-parse --show-toplevel')
+ root_dir = _run_shell_command(
+ ['git', 'rev-parse', '--show-toplevel'])
mailmap = os.path.join(root_dir, mailmap)
if os.path.exists(mailmap):
@@ -202,6 +194,13 @@
return dependency_links
+def _run_git_command(cmd, git_dir, **kwargs):
+ if not isinstance(cmd, (list, tuple)):
+ cmd = [cmd]
+ return _run_shell_command(
+ ['git', '--git-dir=%s' % git_dir] + cmd, **kwargs)
+
+
def _run_shell_command(cmd, throw_on_error=False, buffer=True):
if buffer:
out_location = subprocess.PIPE
@@ -210,14 +209,9 @@
out_location = None
err_location = None
- if os.name == 'nt':
- output = subprocess.Popen(["cmd.exe", "/C", cmd],
- stdout=out_location,
- stderr=err_location)
- else:
- output = subprocess.Popen(["/bin/sh", "-c", cmd],
- stdout=out_location,
- stderr=err_location)
+ output = subprocess.Popen(cmd,
+ stdout=out_location,
+ stderr=err_location)
out = output.communicate()
if output.returncode and throw_on_error:
raise distutils.errors.DistutilsError(
@@ -228,7 +222,11 @@
def _get_git_directory():
- return _run_shell_command("git rev-parse --git-dir", None)
+ return _run_shell_command(['git', 'rev-parse', '--git-dir'])
+
+
+def _git_is_installed():
+ return _run_shell_command(['which', 'git'])
def get_boolean_option(option_dict, option_name, env_name):
@@ -252,8 +250,7 @@
if git_dir is None:
git_dir = _get_git_directory()
if git_dir:
- git_log_cmd = 'git --git-dir=%s log' % git_dir
- changelog = _run_shell_command(git_log_cmd)
+ changelog = _run_git_command('log', git_dir)
mailmap = read_git_mailmap()
with open(new_changelog, "wb") as changelog_file:
changelog_file.write(canonicalize_emails(
@@ -279,18 +276,16 @@
authors = []
# don't include jenkins email address in AUTHORS file
- git_log_cmd = ("git --git-dir=" + git_dir +
- " log --format='%aN <%aE>'"
- " | egrep -v '" + ignore_emails + "'")
- authors += _run_shell_command(git_log_cmd).split('\n')
+ git_log_cmd = ['log', '--format=%aN <%aE>']
+ authors += _run_git_command(git_log_cmd, git_dir).split('\n')
+ authors = [a for a in authors if not re.search(ignore_emails, a)]
# get all co-authors from commit messages
- co_authors_cmd = ("git log --git-dir=" + git_dir +
- " | grep -i Co-authored-by:")
- co_authors = _run_shell_command(co_authors_cmd)
-
+ co_authors_out = _run_git_command('log', git_dir)
+ co_authors = re.findall('Co-authored-by:.+', co_authors_out,
+ re.MULTILINE)
co_authors = [signed.split(":", 1)[1].strip()
- for signed in co_authors.split('\n') if signed]
+ for signed in co_authors if signed]
authors += co_authors
@@ -315,12 +310,11 @@
at absurd times. We only want to do this when we are building an sdist.
"""
file_list = []
- if git_dir is None:
+ if git_dir is None and _git_is_installed():
git_dir = _get_git_directory()
if git_dir:
log.info("[pbr] In git context, generating filelist from git")
- git_ls_cmd = "git --git-dir=%s ls-files -z" % git_dir
- file_list = _run_shell_command(git_ls_cmd)
+ file_list = _run_git_command(['ls-files', '-z'], git_dir)
file_list = file_list.split(b'\x00'.decode('utf-8'))
return [f for f in file_list if f]
@@ -364,9 +358,9 @@
option_dict = self.distribution.get_option_dict('pbr')
if (not self.single_version_externally_managed
and self.distribution.install_requires):
- links = _make_links_args(self.distribution.dependency_links)
_pip_install(
- links, self.distribution.install_requires, self.root,
+ self.distribution.dependency_links,
+ self.distribution.install_requires, self.root,
option_dict=option_dict)
return du_install.install.run(self)
@@ -397,8 +391,7 @@
def install_test_requirements(self):
- links = _make_links_args(
- parse_dependency_links(TEST_REQUIREMENTS_FILES))
+ links = parse_dependency_links(TEST_REQUIREMENTS_FILES)
if self.distribution.tests_require:
option_dict = self.distribution.get_option_dict('pbr')
_pip_install(
@@ -488,7 +481,7 @@
import_target=ep.attrs[0],
invoke_target='.'.join(ep.attrs),
)
- yield (name, header+script_text)
+ yield (name, header + script_text)
class LocalInstallScripts(install_scripts.install_scripts):
@@ -742,14 +735,13 @@
tags then we fall back to counting commits since the beginning
of time.
"""
- describe = _run_shell_command(
- "git --git-dir=%s describe --always" % git_dir)
+ describe = _run_git_command(['describe', '--always'], git_dir)
if "-" in describe:
return describe.rsplit("-", 2)[-2]
# no tags found
- revlist = _run_shell_command(
- "git --git-dir=%s rev-list --abbrev-commit HEAD" % git_dir)
+ revlist = _run_git_command(
+ ['rev-list', '--abbrev-commit', 'HEAD'], git_dir)
return len(revlist.splitlines())
@@ -763,18 +755,23 @@
if git_dir:
if pre_version:
try:
- return _run_shell_command(
- "git --git-dir=" + git_dir + " describe --exact-match",
+ return _run_git_command(
+ ['describe', '--exact-match'], git_dir,
throw_on_error=True).replace('-', '.')
except Exception:
- sha = _run_shell_command(
- "git --git-dir=" + git_dir + " log -n1 --pretty=format:%h")
- return "%s.a%s.g%s" % (pre_version, _get_revno(git_dir), sha)
+ sha = _run_git_command(
+ ['log', '-n1', '--pretty=format:%h'], git_dir)
+ return "%s.dev%s.g%s" % (pre_version, _get_revno(git_dir), sha)
else:
- return _run_shell_command(
- "git --git-dir=" + git_dir + " describe --always").replace(
- '-', '.')
- return None
+ return _run_git_command(
+ ['describe', '--always'], git_dir).replace('-', '.')
+ # If we don't know the version, return an empty string so at least
+ # the downstream users of the value always have the same type of
+ # object to work with.
+ try:
+ return unicode()
+ except NameError:
+ return ''
def _get_version_from_pkg_info(package_name):
@@ -814,7 +811,14 @@
if version:
return version
version = _get_version_from_git(pre_version)
+ # Handle http://bugs.python.org/issue11638
+ # version will either be an empty unicode string or a valid
+ # unicode version string, but either way it's unicode and needs to
+ # be encoded.
+ if sys.version_info[0] == 2:
+ version = version.encode('utf-8')
if version:
return version
raise Exception("Versioning for this project requires either an sdist"
- " tarball, or access to an upstream git repository.")
+ " tarball, or access to an upstream git repository."
+ " Are you sure that git is installed?")
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pbr-0.5.21/pbr/testr_command.py new/pbr-0.5.23/pbr/testr_command.py
--- old/pbr-0.5.21/pbr/testr_command.py 2013-08-04 20:40:39.000000000 +0200
+++ new/pbr-0.5.23/pbr/testr_command.py 2013-10-30 22:02:32.000000000 +0100
@@ -56,9 +56,10 @@
('testr-args=', 't', "Run 'testr' with these args"),
('omit=', 'o', 'Files to omit from coverage calculations'),
('slowest', None, "Show slowest test times after tests complete."),
+ ('no-parallel', None, "Run testr serially"),
]
- boolean_options = ['coverage', 'slowest']
+ boolean_options = ['coverage', 'slowest', 'no_parallel']
def _run_testr(self, *args):
return commands.run_argv([sys.argv[0]] + list(args),
@@ -69,6 +70,7 @@
self.coverage = None
self.omit = ""
self.slowest = None
+ self.no_parallel = None
def finalize_options(self):
if self.testr_args is None:
@@ -85,7 +87,10 @@
if self.coverage:
self._coverage_before()
- testr_ret = self._run_testr("run", "--parallel", *self.testr_args)
+ if not self.no_parallel:
+ testr_ret = self._run_testr("run", "--parallel", *self.testr_args)
+ else:
+ testr_ret = self._run_testr("run", *self.testr_args)
if testr_ret:
raise distutils.errors.DistutilsError(
"testr failed (%d)" % testr_ret)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pbr-0.5.21/pbr/tests/__init__.py new/pbr-0.5.23/pbr/tests/__init__.py
--- old/pbr-0.5.21/pbr/tests/__init__.py 2013-08-04 20:40:39.000000000 +0200
+++ new/pbr-0.5.23/pbr/tests/__init__.py 2013-10-30 22:02:32.000000000 +0100
@@ -1,133 +0,0 @@
-# vim: tabstop=4 shiftwidth=4 softtabstop=4
-
-# Copyright 2010-2011 OpenStack Foundation
-# 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.
-# Copyright (C) 2013 Association of Universities for Research in Astronomy
-# (AURA)
-#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions are met:
-#
-# 1. Redistributions of source code must retain the above copyright
-# notice, this list of conditions and the following disclaimer.
-#
-# 2. Redistributions in binary form must reproduce the above
-# copyright notice, this list of conditions and the following
-# disclaimer in the documentation and/or other materials provided
-# with the distribution.
-#
-# 3. The name of AURA and its representatives may not be used to
-# endorse or promote products derived from this software without
-# specific prior written permission.
-#
-# THIS SOFTWARE IS PROVIDED BY AURA ``AS IS'' AND ANY EXPRESS OR IMPLIED
-# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
-# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-# DISCLAIMED. IN NO EVENT SHALL AURA BE LIABLE FOR ANY DIRECT, INDIRECT,
-# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
-# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
-
-"""Common utilities used in testing"""
-
-import os
-import shutil
-import subprocess
-import sys
-
-import fixtures
-import testresources
-import testtools
-
-from pbr import packaging
-
-
-class DiveDir(fixtures.Fixture):
- """Dive into given directory and return back on cleanup.
-
- :ivar path: The target directory.
- """
-
- def __init__(self, path):
- self.path = path
-
- def setUp(self):
- super(DiveDir, self).setUp()
- self.addCleanup(os.chdir, os.getcwd())
- os.chdir(self.path)
-
-
-class BaseTestCase(testtools.TestCase, testresources.ResourcedTestCase):
-
- def setUp(self):
- super(BaseTestCase, self).setUp()
- test_timeout = os.environ.get('OS_TEST_TIMEOUT', 30)
- try:
- test_timeout = int(test_timeout)
- except ValueError:
- # If timeout value is invalid, fail hard.
- print("OS_TEST_TIMEOUT set to invalid value"
- " defaulting to no timeout")
- test_timeout = 0
- if test_timeout > 0:
- self.useFixture(fixtures.Timeout(test_timeout, gentle=True))
-
- if os.environ.get('OS_STDOUT_CAPTURE') in packaging.TRUE_VALUES:
- stdout = self.useFixture(fixtures.StringStream('stdout')).stream
- self.useFixture(fixtures.MonkeyPatch('sys.stdout', stdout))
- if os.environ.get('OS_STDERR_CAPTURE') in packaging.TRUE_VALUES:
- stderr = self.useFixture(fixtures.StringStream('stderr')).stream
- self.useFixture(fixtures.MonkeyPatch('sys.stderr', stderr))
- self.log_fixture = self.useFixture(
- fixtures.FakeLogger('pbr'))
-
- self.useFixture(fixtures.NestedTempfile())
- self.useFixture(fixtures.FakeLogger())
- self.useFixture(fixtures.EnvironmentVariable('PBR_VERSION', '0.0'))
-
- self.temp_dir = self.useFixture(fixtures.TempDir()).path
- self.package_dir = os.path.join(self.temp_dir, 'testpackage')
- shutil.copytree(os.path.join(os.path.dirname(__file__), 'testpackage'),
- self.package_dir)
- self.addCleanup(os.chdir, os.getcwd())
- os.chdir(self.package_dir)
-
- def tearDown(self):
- # Remove pbr.testpackage from sys.modules so that it can be freshly
- # re-imported by the next test
- for k in list(sys.modules):
- if (k == 'pbr_testpackage' or
- k.startswith('pbr_testpackage.')):
- del sys.modules[k]
- super(BaseTestCase, self).tearDown()
-
- def run_setup(self, *args):
- return self._run_cmd(sys.executable, ('setup.py',) + args)
-
- def _run_cmd(self, cmd, args=[]):
- """Run a command in the root of the test working copy.
-
- Runs a command, with the given argument list, in the root of the test
- working copy--returns the stdout and stderr streams and the exit code
- from the subprocess.
- """
-
- os.chdir(self.package_dir)
- p = subprocess.Popen([cmd] + list(args), stdout=subprocess.PIPE,
- stderr=subprocess.PIPE)
-
- streams = tuple(s.decode('latin1').strip() for s in p.communicate())
- for line in streams:
- print(line)
- return (streams) + (p.returncode,)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pbr-0.5.21/pbr/tests/base.py new/pbr-0.5.23/pbr/tests/base.py
--- old/pbr-0.5.21/pbr/tests/base.py 1970-01-01 01:00:00.000000000 +0100
+++ new/pbr-0.5.23/pbr/tests/base.py 2013-10-30 22:02:32.000000000 +0100
@@ -0,0 +1,133 @@
+# vim: tabstop=4 shiftwidth=4 softtabstop=4
+
+# Copyright 2010-2011 OpenStack Foundation
+# 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.
+# Copyright (C) 2013 Association of Universities for Research in Astronomy
+# (AURA)
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions are met:
+#
+# 1. Redistributions of source code must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+#
+# 2. Redistributions in binary form must reproduce the above
+# copyright notice, this list of conditions and the following
+# disclaimer in the documentation and/or other materials provided
+# with the distribution.
+#
+# 3. The name of AURA and its representatives may not be used to
+# endorse or promote products derived from this software without
+# specific prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED BY AURA ``AS IS'' AND ANY EXPRESS OR IMPLIED
+# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+# DISCLAIMED. IN NO EVENT SHALL AURA BE LIABLE FOR ANY DIRECT, INDIRECT,
+# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
+
+"""Common utilities used in testing"""
+
+import os
+import shutil
+import subprocess
+import sys
+
+import fixtures
+import testresources
+import testtools
+
+from pbr import packaging
+
+
+class DiveDir(fixtures.Fixture):
+ """Dive into given directory and return back on cleanup.
+
+ :ivar path: The target directory.
+ """
+
+ def __init__(self, path):
+ self.path = path
+
+ def setUp(self):
+ super(DiveDir, self).setUp()
+ self.addCleanup(os.chdir, os.getcwd())
+ os.chdir(self.path)
+
+
+class BaseTestCase(testtools.TestCase, testresources.ResourcedTestCase):
+
+ def setUp(self):
+ super(BaseTestCase, self).setUp()
+ test_timeout = os.environ.get('OS_TEST_TIMEOUT', 30)
+ try:
+ test_timeout = int(test_timeout)
+ except ValueError:
+ # If timeout value is invalid, fail hard.
+ print("OS_TEST_TIMEOUT set to invalid value"
+ " defaulting to no timeout")
+ test_timeout = 0
+ if test_timeout > 0:
+ self.useFixture(fixtures.Timeout(test_timeout, gentle=True))
+
+ if os.environ.get('OS_STDOUT_CAPTURE') in packaging.TRUE_VALUES:
+ stdout = self.useFixture(fixtures.StringStream('stdout')).stream
+ self.useFixture(fixtures.MonkeyPatch('sys.stdout', stdout))
+ if os.environ.get('OS_STDERR_CAPTURE') in packaging.TRUE_VALUES:
+ stderr = self.useFixture(fixtures.StringStream('stderr')).stream
+ self.useFixture(fixtures.MonkeyPatch('sys.stderr', stderr))
+ self.log_fixture = self.useFixture(
+ fixtures.FakeLogger('pbr'))
+
+ self.useFixture(fixtures.NestedTempfile())
+ self.useFixture(fixtures.FakeLogger())
+ self.useFixture(fixtures.EnvironmentVariable('PBR_VERSION', '0.0'))
+
+ self.temp_dir = self.useFixture(fixtures.TempDir()).path
+ self.package_dir = os.path.join(self.temp_dir, 'testpackage')
+ shutil.copytree(os.path.join(os.path.dirname(__file__), 'testpackage'),
+ self.package_dir)
+ self.addCleanup(os.chdir, os.getcwd())
+ os.chdir(self.package_dir)
+ self.addCleanup(self._discard_testpackage)
+
+ def _discard_testpackage(self):
+ # Remove pbr.testpackage from sys.modules so that it can be freshly
+ # re-imported by the next test
+ for k in list(sys.modules):
+ if (k == 'pbr_testpackage' or
+ k.startswith('pbr_testpackage.')):
+ del sys.modules[k]
+
+ def run_setup(self, *args):
+ return self._run_cmd(sys.executable, ('setup.py',) + args)
+
+ def _run_cmd(self, cmd, args=[]):
+ """Run a command in the root of the test working copy.
+
+ Runs a command, with the given argument list, in the root of the test
+ working copy--returns the stdout and stderr streams and the exit code
+ from the subprocess.
+ """
+
+ os.chdir(self.package_dir)
+ p = subprocess.Popen([cmd] + list(args), stdout=subprocess.PIPE,
+ stderr=subprocess.PIPE)
+
+ streams = tuple(s.decode('latin1').strip() for s in p.communicate())
+ for line in streams:
+ print(line)
+ return (streams) + (p.returncode,)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pbr-0.5.21/pbr/tests/test_commands.py new/pbr-0.5.23/pbr/tests/test_commands.py
--- old/pbr-0.5.21/pbr/tests/test_commands.py 2013-08-04 20:40:39.000000000 +0200
+++ new/pbr-0.5.23/pbr/tests/test_commands.py 2013-10-30 22:02:32.000000000 +0100
@@ -40,10 +40,10 @@
from testtools import content
-from pbr import tests
+from pbr.tests import base
-class TestCommands(tests.BaseTestCase):
+class TestCommands(base.BaseTestCase):
def test_custom_build_py_command(self):
"""Test custom build_py command.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pbr-0.5.21/pbr/tests/test_core.py new/pbr-0.5.23/pbr/tests/test_core.py
--- old/pbr-0.5.21/pbr/tests/test_core.py 2013-08-04 20:40:39.000000000 +0200
+++ new/pbr-0.5.23/pbr/tests/test_core.py 2013-10-30 22:02:32.000000000 +0100
@@ -44,10 +44,10 @@
import fixtures
-from pbr import tests
+from pbr.tests import base
-class TestCore(tests.BaseTestCase):
+class TestCore(base.BaseTestCase):
cmd_names = ('pbr_test_cmd', 'pbr_test_cmd_with_class')
@@ -122,7 +122,7 @@
self.check_script_install(stdout)
-class TestGitSDist(tests.BaseTestCase):
+class TestGitSDist(base.BaseTestCase):
def setUp(self):
super(TestGitSDist, self).setUp()
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pbr-0.5.21/pbr/tests/test_files.py new/pbr-0.5.23/pbr/tests/test_files.py
--- old/pbr-0.5.21/pbr/tests/test_files.py 2013-08-04 20:40:39.000000000 +0200
+++ new/pbr-0.5.23/pbr/tests/test_files.py 2013-10-30 22:02:32.000000000 +0100
@@ -22,10 +22,10 @@
import fixtures
from pbr.hooks import files
-from pbr import tests
+from pbr.tests import base
-class FilesConfigTest(tests.BaseTestCase):
+class FilesConfigTest(base.BaseTestCase):
def setUp(self):
super(FilesConfigTest, self).setUp()
@@ -49,7 +49,7 @@
with open(os.path.join(subpackage, "__init__.py"), 'w') as foo_file:
foo_file.write("# empty")
- self.useFixture(tests.DiveDir(pkg_fixture.base))
+ self.useFixture(base.DiveDir(pkg_fixture.base))
def test_implicit_auto_package(self):
config = dict(
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pbr-0.5.21/pbr/tests/test_hooks.py new/pbr-0.5.23/pbr/tests/test_hooks.py
--- old/pbr-0.5.21/pbr/tests/test_hooks.py 2013-08-04 20:40:39.000000000 +0200
+++ new/pbr-0.5.23/pbr/tests/test_hooks.py 2013-10-30 22:02:32.000000000 +0100
@@ -41,11 +41,13 @@
import os
import textwrap
-from pbr import tests
+from testtools.matchers import Contains
+
+from pbr.tests import base
from pbr.tests import util
-class TestHooks(tests.BaseTestCase):
+class TestHooks(base.BaseTestCase):
def setUp(self):
super(TestHooks, self).setUp()
with util.open_config(
@@ -89,3 +91,8 @@
""") in stdout # flake8: noqa
assert stdout.endswith('build_ext post-hook')
assert return_code == 0
+
+ def test_custom_commands_known(self):
+ stdout, _, return_code = self.run_setup('--help-commands')
+ self.assertFalse(return_code)
+ self.assertThat(stdout, Contains(" testr "))
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pbr-0.5.21/pbr/tests/test_packaging.py new/pbr-0.5.23/pbr/tests/test_packaging.py
--- old/pbr-0.5.21/pbr/tests/test_packaging.py 2013-08-04 20:40:39.000000000 +0200
+++ new/pbr-0.5.23/pbr/tests/test_packaging.py 2013-10-30 22:02:32.000000000 +0100
@@ -40,13 +40,18 @@
import os
-from pbr import tests
+import fixtures
+from pbr.tests import base
-class TestPackagingInGitRepoWithCommit(tests.BaseTestCase):
+
+class TestPackagingInGitRepoWithCommit(base.BaseTestCase):
def setUp(self):
super(TestPackagingInGitRepoWithCommit, self).setUp()
+ self.useFixture(fixtures.TempHomeDir())
+ self._run_cmd(
+ 'git', ['config', '--global', 'user.email', 'nobody@example.com'])
self._run_cmd('git', ['init', '.'])
self._run_cmd('git', ['add', '.'])
self._run_cmd('git', ['commit', '-m', 'test commit'])
@@ -66,7 +71,7 @@
self.assertNotEqual(body, '')
-class TestPackagingInGitRepoWithoutCommit(tests.BaseTestCase):
+class TestPackagingInGitRepoWithoutCommit(base.BaseTestCase):
def setUp(self):
super(TestPackagingInGitRepoWithoutCommit, self).setUp()
@@ -88,7 +93,7 @@
self.assertEqual(body, '')
-class TestPackagingInPlainDirectory(tests.BaseTestCase):
+class TestPackagingInPlainDirectory(base.BaseTestCase):
def setUp(self):
super(TestPackagingInPlainDirectory, self).setUp()
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pbr-0.5.21/pbr/tests/test_setup.py new/pbr-0.5.23/pbr/tests/test_setup.py
--- old/pbr-0.5.21/pbr/tests/test_setup.py 2013-08-04 20:40:39.000000000 +0200
+++ new/pbr-0.5.23/pbr/tests/test_setup.py 2013-10-30 22:02:32.000000000 +0100
@@ -33,10 +33,10 @@
import testscenarios
from pbr import packaging
-from pbr import tests
+from pbr.tests import base
-class EmailTestCase(tests.BaseTestCase):
+class EmailTestCase(base.BaseTestCase):
def test_str_dict_replace(self):
string = 'Johnnie T. Hozer'
@@ -45,7 +45,7 @@
packaging.canonicalize_emails(string, mapping))
-class MailmapTestCase(tests.BaseTestCase):
+class MailmapTestCase(base.BaseTestCase):
def setUp(self):
super(MailmapTestCase, self).setUp()
@@ -71,7 +71,7 @@
packaging.read_git_mailmap(self.root_dir))
-class SkipFileWrites(tests.BaseTestCase):
+class SkipFileWrites(base.BaseTestCase):
scenarios = [
('changelog_option_true',
@@ -135,7 +135,7 @@
or self.env_value is not None))
-class GitLogsTest(tests.BaseTestCase):
+class GitLogsTest(base.BaseTestCase):
def setUp(self):
super(GitLogsTest, self).setUp()
@@ -170,20 +170,15 @@
with open(os.path.join(self.temp_path, "ChangeLog"), "r") as ch_fh:
self.assertTrue("email@foo.com" in ch_fh.read())
- def _fake_log_output(self, cmd, mapping):
- for (k, v) in mapping.items():
- if cmd.startswith(k):
- return v.encode('utf-8')
- return b""
-
def test_generate_authors(self):
- author_old = "Foo Foo "
- author_new = "Bar Bar "
- co_author = "Foo Bar "
- co_author_by = "Co-authored-by: " + co_author
-
- git_log_cmd = ("git --git-dir=%s log --format" % self.git_dir)
- git_co_log_cmd = ("git log --git-dir=%s" % self.git_dir)
+ author_old = u"Foo Foo "
+ author_new = u"Bar Bar "
+ co_author = u"Foo Bar "
+ co_author_by = u"Co-authored-by: " + co_author
+
+ git_log_cmd = (
+ "git --git-dir=%s log --format=%%aN <%%aE>" % self.git_dir)
+ git_co_log_cmd = ("git --git-dir=%s log" % self.git_dir)
git_top_level = "git rev-parse --show-toplevel"
cmd_map = {
git_log_cmd: author_new,
@@ -197,10 +192,12 @@
"os.path.exists",
lambda path: os.path.abspath(path) in exist_files))
- self.useFixture(fixtures.FakePopen(lambda proc_args: {
- "stdout": BytesIO(
- self._fake_log_output(proc_args["args"][2], cmd_map))
- }))
+ def _fake_run_shell_command(cmd, **kwargs):
+ return cmd_map[" ".join(cmd)]
+
+ self.useFixture(fixtures.MonkeyPatch(
+ "pbr.packaging._run_shell_command",
+ _fake_run_shell_command))
with open(os.path.join(self.temp_path, "AUTHORS.in"), "w") as auth_fh:
auth_fh.write("%s\n" % author_old)
@@ -215,7 +212,7 @@
self.assertTrue(co_author in authors)
-class BuildSphinxTest(tests.BaseTestCase):
+class BuildSphinxTest(base.BaseTestCase):
scenarios = [
('true_autodoc_caps',
@@ -241,7 +238,7 @@
pkg_fixture = fixtures.PythonPackage(
"fake_package", [("fake_module.py", b"")])
self.useFixture(pkg_fixture)
- self.useFixture(tests.DiveDir(pkg_fixture.base))
+ self.useFixture(base.DiveDir(pkg_fixture.base))
def test_build_doc(self):
if self.has_opt:
@@ -257,7 +254,7 @@
"api/fake_package.fake_module.rst") == self.has_autodoc)
-class ParseRequirementsTest(tests.BaseTestCase):
+class ParseRequirementsTest(base.BaseTestCase):
def setUp(self):
super(ParseRequirementsTest, self).setUp()
@@ -334,7 +331,7 @@
packaging.parse_requirements([self.tmp_file]))
-class ParseDependencyLinksTest(tests.BaseTestCase):
+class ParseDependencyLinksTest(base.BaseTestCase):
def setUp(self):
super(ParseDependencyLinksTest, self).setUp()
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pbr-0.5.21/pbr/tests/test_version.py new/pbr-0.5.23/pbr/tests/test_version.py
--- old/pbr-0.5.21/pbr/tests/test_version.py 2013-08-04 20:40:39.000000000 +0200
+++ new/pbr-0.5.23/pbr/tests/test_version.py 2013-10-30 22:02:32.000000000 +0100
@@ -15,11 +15,11 @@
# License for the specific language governing permissions and limitations
# under the License.
-from pbr import tests
+from pbr.tests import base
from pbr import version
-class DeferredVersionTestCase(tests.BaseTestCase):
+class DeferredVersionTestCase(base.BaseTestCase):
def test_cached_version(self):
class MyVersionInfo(version.VersionInfo):
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pbr-0.5.21/pbr.egg-info/PKG-INFO new/pbr-0.5.23/pbr.egg-info/PKG-INFO
--- old/pbr-0.5.21/pbr.egg-info/PKG-INFO 2013-08-04 20:41:10.000000000 +0200
+++ new/pbr-0.5.23/pbr.egg-info/PKG-INFO 2013-10-30 22:02:56.000000000 +0100
@@ -1,6 +1,6 @@
Metadata-Version: 1.1
Name: pbr
-Version: 0.5.21
+Version: 0.5.23
Summary: Python Build Reasonableness
Home-page: http://pypi.python.org/pypi/pbr
Author: OpenStack
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pbr-0.5.21/pbr.egg-info/SOURCES.txt new/pbr-0.5.23/pbr.egg-info/SOURCES.txt
--- old/pbr-0.5.21/pbr.egg-info/SOURCES.txt 2013-08-04 20:41:10.000000000 +0200
+++ new/pbr-0.5.23/pbr.egg-info/SOURCES.txt 2013-10-30 22:02:56.000000000 +0100
@@ -13,6 +13,7 @@
tox.ini
doc/source/conf.py
doc/source/index.rst
+doc/source/packagers.rst
doc/source/_templates/.placeholder
doc/source/_theme/layout.html
doc/source/_theme/theme.conf
@@ -46,6 +47,7 @@
pbr/hooks/files.py
pbr/hooks/metadata.py
pbr/tests/__init__.py
+pbr/tests/base.py
pbr/tests/test_commands.py
pbr/tests/test_core.py
pbr/tests/test_files.py
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pbr-0.5.21/test-requirements.txt new/pbr-0.5.23/test-requirements.txt
--- old/pbr-0.5.21/test-requirements.txt 2013-08-04 20:40:40.000000000 +0200
+++ new/pbr-0.5.23/test-requirements.txt 2013-10-30 22:02:32.000000000 +0100
@@ -1,10 +1,10 @@
coverage>=3.6
discover
fixtures>=0.3.12
-flake8
+flake8==2.0
python-subunit
sphinx>=1.1.2
-testrepository>=0.0.13
-testresources
-testscenarios
-testtools>=0.9.27
+testrepository>=0.0.17
+testresources<0.3
+testscenarios>=0.4,<0.5
+testtools>=0.9.32
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pbr-0.5.21/tools/integration.sh new/pbr-0.5.23/tools/integration.sh
--- old/pbr-0.5.21/tools/integration.sh 2013-08-04 20:40:40.000000000 +0200
+++ new/pbr-0.5.23/tools/integration.sh 2013-10-30 22:02:32.000000000 +0100
@@ -24,7 +24,7 @@
REPODIR=${REPODIR:-$BASE/new}
# TODO: Figure out how to get this on to the box properly
-sudo apt-get install -y --force-yes libxml2-dev libxslt-dev libmysqlclient-dev libpq-dev libnspr4-dev pkg-config libsqlite3-dev libzmq-dev libffi-dev
+sudo apt-get install -y --force-yes libxml2-dev libxslt-dev libmysqlclient-dev libpq-dev libnspr4-dev pkg-config libsqlite3-dev libzmq-dev libffi-dev libldap2-dev libsasl2-dev
tmpdir=$(mktemp -d)
@@ -63,21 +63,6 @@
output: $pypidir
EOF
-# Default to using pypi.openstack.org as an easy_install mirror
-if [ "$1" == "--no-mirror" ] ; then
- shift
-else
- cat <<EOF > ~/.pydistutils.cfg
-[easy_install]
-index_url = http://pypi.openstack.org/openstack
-EOF
- cat <<EOF > ~/.pip/pip.conf
-[global]
-index-url = http://pypi.openstack.org/openstack
-log = $HOME/pip.log
-EOF
-fi
-
# PROJECTS is a list of projects that we're testing
PROJECTS=$*
@@ -173,6 +158,13 @@
continue
fi
shortprojectdir=$projectdir/$SHORT_PROJECT
+ sudo chown -R $USER $REPODIR/$SHORT_PROJECT
+ (cd $REPODIR/requirements && python update.py $REPODIR/$SHORT_PROJECT)
+ pushd $REPODIR/$SHORT_PROJECT
+ if ! git diff --quiet ; then
+ git commit -a -m'Update requirements'
+ fi
+ popd
git clone $REPODIR/$SHORT_PROJECT $shortprojectdir
sdistvenv=$tmpdir/sdist
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pbr-0.5.21/tox.ini new/pbr-0.5.23/tox.ini
--- old/pbr-0.5.21/tox.ini 2013-08-04 20:40:40.000000000 +0200
+++ new/pbr-0.5.23/tox.ini 2013-10-30 22:02:32.000000000 +0100
@@ -1,7 +1,11 @@
[tox]
-envlist = py26,py27,py33,pep8
+minversion = 1.6
+skipsdist = True
+envlist = py26,py27,py33,pypy,pep8
[testenv]
+usedevelop = True
+install_command = pip install {opts} {packages}
setenv = VIRTUAL_ENV={envdir}
LANG=en_US.UTF-8
LANGUAGE=en_US:en
@@ -30,5 +34,6 @@
commands = {posargs}
[flake8]
+ignore = H803
exclude = .venv,.tox,dist,doc,*.egg,build
show-source = true
++++++ rpmlintrc ++++++
# It's just the testsuite:
addFilter("E: devel-file-in-non-devel-package")
--
To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org
For additional commands, e-mail: opensuse-commit+help@opensuse.org