diff -Nru python-pbr-0.9.0/AUTHORS python-pbr-0.7.0/AUTHORS --- python-pbr-0.9.0/AUTHORS 2014-07-07 15:44:21.000000000 +0000 +++ python-pbr-0.7.0/AUTHORS 2014-03-18 14:08:30.000000000 +0000 @@ -1,74 +1 @@ -Alex Gaynor -Andrew Bogott -Angus Salkeld -Anthony Young -Attila Fazekas -Ben Nemec -Bhuvan Arumugam -Brian Waldon -Chang Bo Guo -ChangBo Guo(gcb) -Chuck Short -Clark Boylan -Dan Prince -Davanum Srinivas -David Ripton -Devananda van der Veen -Dirk Mueller -Doug Hellmann -Doug Hellmann -Eoghan Glynn -Eric Windisch -Erik M. Bray -Eugene Kirpichov -Gary Kotton -Giampaolo Lauria -Ionuț Arțăriși -Jason Kölker -Jay Pipes -Jeremy Stanley -Joe Gordon -Joe Gordon -Joe Heck -Johannes Erdfelt -Julien Danjou -Kevin McCarthy -Khai Do -Laurence Miao -Marc Abramowitz -Mark McLoughlin -Mark Sienkiewicz -Maru Newby -Matthew Treinish -Michael Basnight -Michael Still -Monty Taylor -Nikhil Manchanda -Octavian Ciuhandu -Rajaram Mallya -Rick Harris -Robert Collins -Robert Myers -Roger Luethi -Ruby Loo -Russell Bryant -Ryan Petrello -Sascha Peilicke -Sean Dague -Sean Dague -Sergey Lukjanov -Steve Kowalik -Steven Hardy -Thomas Grainger -Thomas Leaman -Tim Simpson -Toilal -Vasudev Kamath -Vincent Untz -Vishvananda Ishaya -YAMAMOTO Takashi -Yaguang Tang -Yuriy Taraday -Zhongyue Luo -alexpilotti -cbjchen@cn.ibm.com + diff -Nru python-pbr-0.9.0/ChangeLog python-pbr-0.7.0/ChangeLog --- python-pbr-0.9.0/ChangeLog 2014-07-07 15:44:21.000000000 +0000 +++ python-pbr-0.7.0/ChangeLog 2014-03-18 14:08:29.000000000 +0000 @@ -1,46 +1,6 @@ CHANGES ======= -0.9.0 ------ - -* Allow examining parsing exceptions -* Update integration script for Apache 2.4 -* Restore Monkeypatched Distribution Instance -* Register testr as a distutil entry point -* Check for git before querying it for a version -* Allow _run_cmd to run commands in any directory -* Make setUp fail if sdist fails -* Permit pre-release versions with git metadata -* Un-nest some sections of code - -0.8.2 ------ - -* Remove --use-mailmap as it's not needed -* Fix typos in docs - -0.8.1 ------ - -* pbr/testr_command.py: Add logging -* Documentation updates -* Fixed a typo in the documentation -* Make source configurable when using --coverage -* README.rst: tweaks -* Format autoindex.rst file properly -* make pbr use hacking directly - -0.8.0 ------ - -* Use unicode_literals import instead of u'unicode' notation -* Add support for nested requirements files -* Remove pip version specifier -* Make tools/integration.sh take a branch -* Fixes blocking issue on Windows -* Remove duplicate git setup in tests - 0.7.0 ----- diff -Nru python-pbr-0.9.0/debian/changelog python-pbr-0.7.0/debian/changelog --- python-pbr-0.9.0/debian/changelog 2014-07-08 12:31:55.000000000 +0000 +++ python-pbr-0.7.0/debian/changelog 2014-07-18 14:01:35.000000000 +0000 @@ -1,22 +1,8 @@ -python-pbr (0.9.0-0ubuntu1) utopic; urgency=medium +python-pbr (0.7.0-0ubuntu3) precise; urgency=low - * New upstream release. + * No-change backport to precise - -- Chuck Short Tue, 08 Jul 2014 08:31:42 -0400 - -python-pbr (0.8.2-0ubuntu1) utopic; urgency=medium - - * New upstream release. - - -- Chuck Short Tue, 03 Jun 2014 08:48:10 -0400 - -python-pbr (0.8.0-0ubuntu1) utopic; urgency=medium - - * New upstream release. - * debian/patches/python-3.2-compat.patch: Dropped no longer needed. - * debian/patches/drop-pip-requirement.patch: Refreshed. - - -- Chuck Short Thu, 01 May 2014 09:18:33 -0400 + -- Lars Butler (larsbutler) Fri, 18 Jul 2014 14:01:06 +0000 python-pbr (0.7.0-0ubuntu2) trusty; urgency=medium @@ -47,14 +33,14 @@ python-pbr (0.5.23-0ubuntu3) trusty; urgency=low - * d/p/python-3.2-compat.patch: Fix Python 3.2 compat a bit harder. + * d/p/python-3.2-compat.patch: Fix Python 3.2 compat a bit harder. -- James Page Thu, 05 Dec 2013 07:51:15 +0000 python-pbr (0.5.23-0ubuntu2) trusty; urgency=low * d/p/python-3.2-compat.patch: Fixup compatibility with Python 3.2 to - ease backporting to Ubuntu 12.04. + ease backporting to Ubuntu 12.04. -- James Page Wed, 04 Dec 2013 15:40:35 +0000 @@ -69,7 +55,7 @@ * New upstream release: - debian/control: Dropped openstack-pkg-tools, python3-d2to1, python-d2to1 dependencies. - - debian/rules: + - debian/rules: + Dropped openstack-pkg-tools cruft. + Dont remove the egg info when cleaning. @@ -91,15 +77,15 @@ python-pbr (0.5.21-0ubuntu2) saucy; urgency=low - * debian/patches/drop-pip-requirements.patch: Drop python-pip from - requirements its in universe. + * debian/patches/drop-pip-requirements.patch: Drop python-pip from + requirements its in universe. -- Chuck Short Tue, 13 Aug 2013 11:21:53 -0400 python-pbr (0.5.21-0ubuntu1) saucy; urgency=low * New upstream release. - * debian/control: + * debian/control: - Dropped python-setuptools-git as a build dependency. -- Chuck Short Tue, 06 Aug 2013 07:59:51 -0400 diff -Nru python-pbr-0.9.0/debian/patches/drop-pip-requirement.patch python-pbr-0.7.0/debian/patches/drop-pip-requirement.patch --- python-pbr-0.9.0/debian/patches/drop-pip-requirement.patch 2014-05-01 13:21:57.000000000 +0000 +++ python-pbr-0.7.0/debian/patches/drop-pip-requirement.patch 2014-03-18 15:30:14.000000000 +0000 @@ -1,5 +1,5 @@ -diff -Naurp pbr-0.8.0.orig/requirements.txt pbr-0.8.0/requirements.txt ---- pbr-0.8.0.orig/requirements.txt 2014-03-27 18:08:41.000000000 -0400 -+++ pbr-0.8.0/requirements.txt 2014-05-01 09:21:28.687404421 -0400 +diff -Naurp pbr-0.7.0.orig/requirements.txt pbr-0.7.0/requirements.txt +--- pbr-0.7.0.orig/requirements.txt 2014-03-18 10:08:07.000000000 -0400 ++++ pbr-0.7.0/requirements.txt 2014-03-18 11:29:51.219870236 -0400 @@ -1 +0,0 @@ --pip +-pip>=1.4 diff -Nru python-pbr-0.9.0/debian/patches/python-3.2-compat.patch python-pbr-0.7.0/debian/patches/python-3.2-compat.patch --- python-pbr-0.9.0/debian/patches/python-3.2-compat.patch 1970-01-01 00:00:00.000000000 +0000 +++ python-pbr-0.7.0/debian/patches/python-3.2-compat.patch 2014-03-27 13:30:20.000000000 +0000 @@ -0,0 +1,41 @@ +Description: Fix python-pbr on python3.2 +Author: Chuck Short +Forwarded: No +diff -Naurp pbr-0.7.0.orig/pbr/packaging.py pbr-0.7.0/pbr/packaging.py +--- pbr-0.7.0.orig/pbr/packaging.py 2014-03-18 10:08:07.000000000 -0400 ++++ pbr-0.7.0/pbr/packaging.py 2014-03-27 09:26:56.759481000 -0400 +@@ -280,7 +280,7 @@ def write_git_changelog(git_dir=None, de + + underline = len(tag) * '-' + if not first_line: +- changelog_file.write(u'\n') ++ changelog_file.write('\n') + changelog_file.write( + ("%(tag)s\n%(underline)s\n\n" % + dict(tag=tag, +diff -Naurp pbr-0.7.0.orig/pbr/tests/test_setup.py pbr-0.7.0/pbr/tests/test_setup.py +--- pbr-0.7.0.orig/pbr/tests/test_setup.py 2014-03-18 10:08:07.000000000 -0400 ++++ pbr-0.7.0/pbr/tests/test_setup.py 2014-03-27 09:24:58.139481000 -0400 +@@ -17,6 +17,7 @@ + # under the License. + + from __future__ import print_function ++from __future__ import unicode_literals + + import os + import sys +@@ -145,10 +146,10 @@ class GitLogsTest(base.BaseTestCase): + self.assertNotIn('Merge "', changelog_contents) + + def test_generate_authors(self): +- author_old = u"Foo Foo " +- author_new = u"Bar Bar " +- co_author = u"Foo Bar " +- co_author_by = u"Co-authored-by: " + co_author ++ 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 --use-mailmap --format=%%aN <%%aE>" diff -Nru python-pbr-0.9.0/debian/patches/series python-pbr-0.7.0/debian/patches/series --- python-pbr-0.9.0/debian/patches/series 2014-05-01 13:22:07.000000000 +0000 +++ python-pbr-0.7.0/debian/patches/series 2013-12-04 15:32:28.000000000 +0000 @@ -1 +1,2 @@ drop-pip-requirement.patch +python-3.2-compat.patch diff -Nru python-pbr-0.9.0/doc/source/index.rst python-pbr-0.7.0/doc/source/index.rst --- python-pbr-0.9.0/doc/source/index.rst 2014-07-07 15:43:49.000000000 +0000 +++ python-pbr-0.7.0/doc/source/index.rst 2014-03-18 14:08:07.000000000 +0000 @@ -32,11 +32,6 @@ version you are working towards, and will generate alpha version strings based on commits since last tag and the current git sha. -.. note:: - - Note that `pbr` expects git tags to be signed, for using it to - calculate version. - The versions are expected to be compliant with :doc:`semver`. AUTHORS and ChangeLog @@ -65,10 +60,10 @@ You may not have noticed, but there are differences in how pip requirements.txt files work and how distutils wants to be told about requirements. The pip way is nicer, because it sure does make it easier to -populate a virtualenv for testing, or to just install everything you need. +popuplate a virtualenv for testing, or to just install everything you need. Duplicating the information, though, is super lame. So PBR will let you keep requirements.txt format files around describing the requirements for -your project, will parse them and split them up appropriately, and inject +your project, will parse them and split them up approprirately, and inject them into the install_requires and/or tests_require and/or dependency_links arguments to setup. Voila! @@ -100,14 +95,14 @@ pbr requires a distribution to use distribute. Your distribution must include a distutils2-like setup.cfg file, and a minimal setup.py script. -A simple sample can be found in pbr's own setup.cfg +A simple sample can be found in pbr s own setup.cfg (it uses its own machinery to install itself):: [metadata] name = pbr author = OpenStack Foundation author-email = openstack-dev@lists.openstack.org - summary = OpenStack's setup automation in a reusable form + summary = OpenStack's setup automation in a reuable form description-file = README license = Apache-2 classifier = diff -Nru python-pbr-0.9.0/doc/source/packagers.rst python-pbr-0.7.0/doc/source/packagers.rst --- python-pbr-0.9.0/doc/source/packagers.rst 2014-07-07 15:43:49.000000000 +0000 +++ python-pbr-0.7.0/doc/source/packagers.rst 2014-03-18 14:08:07.000000000 +0000 @@ -57,25 +57,3 @@ 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. - -AUTHORS and ChangeLog -===================== - -`pbr` generates AUTHORS and ChangeLog files from git information. This -can cause problem in distro packaging if packager is using git -repository for packaging source. If that is the case setting -`SKIP_GENERATE_AUTHORS` - -:: - - SKIP_GENERATE_AUTHORS=1 - -will cause logic around generating AUTHORS using git information to be -skipped. Similarly setting `SKIP_WRITE_GIT_CHANGELOG` - -:: - - SKIP_WRITE_GIT_CHANGELOG=1 - -will cause logic around generating ChangeLog file using git -information to be skipped. diff -Nru python-pbr-0.9.0/doc/source/semver.rst python-pbr-0.7.0/doc/source/semver.rst --- python-pbr-0.9.0/doc/source/semver.rst 2014-07-07 15:43:49.000000000 +0000 +++ python-pbr-0.7.0/doc/source/semver.rst 2014-03-18 14:08:07.000000000 +0000 @@ -57,7 +57,7 @@ and what has been modified from one version to the next. Linux Compatible Semantic Versioning is different from Semantic -Versioning in that it does not employ the use of the hyphen in ways that +Versioning in that it does not employ the use of the hypen in ways that are ambiguous when used with or adjacent to software packaged with dpkg or rpm. Instead, it draws from PEP440's approach of indicating pre-releases with leading characters in the version segment. @@ -120,7 +120,7 @@ version. Examples: 1.0.0.a1, 1.0.0.b99, 1.0.0.rc1000. #. A development version MAY be denoted by appending a dot separated - identifier immediately following the patch version. + indentifier immediately following the patch version. The identifier MUST comprise the string dev followed by non-negative integer value. The identifier MUST NOT be empty. Development versions have a lower precedence than the associated normal version. A development @@ -131,7 +131,7 @@ communication of not-yet-released ideas. Example: 1.0.0.dev1. #. git version metadata MAY be denoted by appending a dot separated - identifier immediately following a development or pre-release version. + identifier immediately following a development version. The identifier MUST comprise the character g followed by a seven character git short-sha. The sha MUST NOT be empty. git version metadata MUST be ignored when determining version precedence. Thus diff -Nru python-pbr-0.9.0/pbr/core.py python-pbr-0.7.0/pbr/core.py --- python-pbr-0.9.0/pbr/core.py 2014-07-07 15:43:49.000000000 +0000 +++ python-pbr-0.7.0/pbr/core.py 2014-03-18 14:08:07.000000000 +0000 @@ -40,7 +40,6 @@ from distutils import core from distutils import errors -import logging import os import sys import warnings @@ -50,17 +49,7 @@ from pbr import util -_saved_core_distribution = core.Distribution - - -def _monkeypatch_distribution(): - core.Distribution = dist._get_unpatched(core.Distribution) - - -def _restore_distribution_monkeypatch(): - core.Distribution = _saved_core_distribution - - +core.Distribution = dist._get_unpatched(core.Distribution) if sys.version_info[0] == 3: string_type = str integer_types = (int,) @@ -87,63 +76,52 @@ not work well with distributions that do use a `Distribution` subclass. """ + if not value: + return + if isinstance(value, string_type): + path = os.path.abspath(value) + else: + path = os.path.abspath('setup.cfg') + if not os.path.exists(path): + raise errors.DistutilsFileError( + 'The setup.cfg file %s does not exist.' % path) + + # Converts the setup.cfg file to setup() arguments try: - _monkeypatch_distribution() - if not value: - return - if isinstance(value, string_type): - path = os.path.abspath(value) - else: - path = os.path.abspath('setup.cfg') - if not os.path.exists(path): - raise errors.DistutilsFileError( - 'The setup.cfg file %s does not exist.' % path) - - # Converts the setup.cfg file to setup() arguments - try: - attrs = util.cfg_to_args(path) - except Exception: - e = sys.exc_info()[1] - # NB: This will output to the console if no explicit logging has - # been setup - but thats fine, this is a fatal distutils error, so - # being pretty isn't the #1 goal.. being diagnosable is. - logging.exception('Error parsing') - raise errors.DistutilsSetupError( - 'Error parsing %s: %s: %s' % (path, e.__class__.__name__, e)) - - # Repeat some of the Distribution initialization code with the newly - # provided attrs - if attrs: - # Skips 'options' and 'licence' support which are rarely used; may - # add back in later if demanded - for key, val in attrs.items(): - if hasattr(dist.metadata, 'set_' + key): - getattr(dist.metadata, 'set_' + key)(val) - elif hasattr(dist.metadata, key): - setattr(dist.metadata, key, val) - elif hasattr(dist, key): - setattr(dist, key, val) - else: - msg = 'Unknown distribution option: %s' % repr(key) - warnings.warn(msg) - - # Re-finalize the underlying Distribution - core.Distribution.finalize_options(dist) - - # This bit comes out of distribute/setuptools - if isinstance(dist.metadata.version, integer_types + (float,)): - # Some people apparently take "version number" too literally :) - dist.metadata.version = str(dist.metadata.version) - - # This bit of hackery is necessary so that the Distribution will ignore - # normally unsupport command options (namely pre-hooks and post-hooks). - # dist.command_options is normally a dict mapping command names to - # dicts of their options. Now it will be a defaultdict that returns - # IgnoreDicts for the each command's options so we can pass through the - # unsupported options - ignore = ['pre_hook.*', 'post_hook.*'] - dist.command_options = util.DefaultGetDict( - lambda: util.IgnoreDict(ignore) - ) - finally: - _restore_distribution_monkeypatch() + attrs = util.cfg_to_args(path) + except Exception: + e = sys.exc_info()[1] + raise errors.DistutilsSetupError( + 'Error parsing %s: %s: %s' % (path, e.__class__.__name__, e)) + + # Repeat some of the Distribution initialization code with the newly + # provided attrs + if attrs: + # Skips 'options' and 'licence' support which are rarely used; may add + # back in later if demanded + for key, val in attrs.items(): + if hasattr(dist.metadata, 'set_' + key): + getattr(dist.metadata, 'set_' + key)(val) + elif hasattr(dist.metadata, key): + setattr(dist.metadata, key, val) + elif hasattr(dist, key): + setattr(dist, key, val) + else: + msg = 'Unknown distribution option: %s' % repr(key) + warnings.warn(msg) + + # Re-finalize the underlying Distribution + core.Distribution.finalize_options(dist) + + # This bit comes out of distribute/setuptools + if isinstance(dist.metadata.version, integer_types + (float,)): + # Some people apparently take "version number" too literally :) + dist.metadata.version = str(dist.metadata.version) + + # This bit of hackery is necessary so that the Distribution will ignore + # normally unsupport command options (namely pre-hooks and post-hooks). + # dist.command_options is normally a dict mapping command names to dicts of + # their options. Now it will be a defaultdict that returns IgnoreDicts for + # the each command's options so we can pass through the unsupported options + ignore = ['pre_hook.*', 'post_hook.*'] + dist.command_options = util.DefaultGetDict(lambda: util.IgnoreDict(ignore)) diff -Nru python-pbr-0.9.0/pbr/packaging.py python-pbr-0.7.0/pbr/packaging.py --- python-pbr-0.9.0/pbr/packaging.py 2014-07-07 15:43:49.000000000 +0000 +++ python-pbr-0.7.0/pbr/packaging.py 2014-03-18 14:08:07.000000000 +0000 @@ -87,11 +87,9 @@ for link in links: cmd.append("-f") cmd.append(link) - - # NOTE(ociuhandu): popen on Windows does not accept unicode strings _run_shell_command( cmd + requires, - throw_on_error=True, buffer=False, env=dict(PIP_USE_WHEEL=b"true")) + throw_on_error=True, buffer=False, env=dict(PIP_USE_WHEEL="true")) def _any_existing(file_list): @@ -125,13 +123,6 @@ if (not line.strip()) or line.startswith('#'): continue - # Handle nested requirements files such as: - # -r other-requirements.txt - if line.startswith('-r'): - req_file = line.partition(' ')[2] - requirements += parse_requirements([req_file]) - continue - try: project_name = pkg_resources.Requirement.parse(line).project_name except ValueError: @@ -253,101 +244,95 @@ """Write a changelog based on the git changelog.""" should_skip = get_boolean_option(option_dict, 'skip_changelog', 'SKIP_WRITE_GIT_CHANGELOG') - if should_skip: - return - - new_changelog = os.path.join(dest_dir, 'ChangeLog') - # If there's already a ChangeLog and it's not writable, just use it - if (os.path.exists(new_changelog) - and not os.access(new_changelog, os.W_OK)): - return - log.info('[pbr] Writing ChangeLog') - if git_dir is None: - git_dir = _get_git_directory() - if not git_dir: - return - - log_cmd = ['log', '--oneline', '--decorate'] - changelog = _run_git_command(log_cmd, git_dir) - first_line = True - with io.open(new_changelog, "w", - encoding="utf-8") as changelog_file: - changelog_file.write("CHANGES\n=======\n\n") - for line in changelog.split('\n'): - line_parts = line.split() - if len(line_parts) < 2: - continue - # Tags are in a list contained in ()'s. If a commit - # subject that is tagged happens to have ()'s in it - # this will fail - if line_parts[1].startswith('(') and ')' in line: - msg = line.split(')')[1].strip() - else: - msg = " ".join(line_parts[1:]) - - if "tag:" in line: - tags = [ - tag.split(",")[0] - for tag in line.split(")")[0].split("tag: ")[1:]] - tag = _get_highest_tag(tags) - - underline = len(tag) * '-' - if not first_line: - changelog_file.write('\n') - changelog_file.write( - ("%(tag)s\n%(underline)s\n\n" % - dict(tag=tag, - underline=underline))) - - if not msg.startswith("Merge "): - if msg.endswith("."): - msg = msg[:-1] - changelog_file.write( - ("* %(msg)s\n" % dict(msg=msg))) - first_line = False + if not should_skip: + new_changelog = os.path.join(dest_dir, 'ChangeLog') + # If there's already a ChangeLog and it's not writable, just use it + if (os.path.exists(new_changelog) + and not os.access(new_changelog, os.W_OK)): + return + log.info('[pbr] Writing ChangeLog') + if git_dir is None: + git_dir = _get_git_directory() + if git_dir: + log_cmd = ['log', '--oneline', '--decorate'] + changelog = _run_git_command(log_cmd, git_dir) + first_line = True + with io.open(new_changelog, "w", + encoding="utf-8") as changelog_file: + changelog_file.write("CHANGES\n=======\n\n") + for line in changelog.split('\n'): + line_parts = line.split() + if len(line_parts) < 2: + continue + # Tags are in a list contained in ()'s. If a commit + # subject that is tagged happens to have ()'s in it + # this will fail + if line_parts[1].startswith('(') and ')' in line: + msg = line.split(')')[1].strip() + else: + msg = " ".join(line_parts[1:]) + + if "tag:" in line: + tags = [ + tag.split(",")[0] + for tag in line.split(")")[0].split("tag: ")[1:]] + tag = _get_highest_tag(tags) + + underline = len(tag) * '-' + if not first_line: + changelog_file.write(u'\n') + changelog_file.write( + ("%(tag)s\n%(underline)s\n\n" % + dict(tag=tag, + underline=underline))) + + if not msg.startswith("Merge "): + if msg.endswith("."): + msg = msg[:-1] + changelog_file.write( + ("* %(msg)s\n" % dict(msg=msg))) + first_line = False def generate_authors(git_dir=None, dest_dir='.', option_dict=dict()): """Create AUTHORS file using git commits.""" should_skip = get_boolean_option(option_dict, 'skip_authors', 'SKIP_GENERATE_AUTHORS') - if should_skip: - return - - 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 - if (os.path.exists(new_authors) - and not os.access(new_authors, os.W_OK)): - return - log.info('[pbr] Generating AUTHORS') - ignore_emails = '(jenkins@review|infra@lists|jenkins@openstack)' - if git_dir is None: - git_dir = _get_git_directory() - if git_dir: - authors = [] - - # don't include jenkins email address in AUTHORS file - 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_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 if signed] - - authors += co_authors - authors = sorted(set(authors)) - - with open(new_authors, 'wb') as new_authors_fh: - if os.path.exists(old_authors): - with open(old_authors, "rb") as old_authors_fh: - new_authors_fh.write(old_authors_fh.read()) - new_authors_fh.write(('\n'.join(authors) + '\n') - .encode('utf-8')) + if not should_skip: + 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 + if (os.path.exists(new_authors) + and not os.access(new_authors, os.W_OK)): + return + log.info('[pbr] Generating AUTHORS') + ignore_emails = '(jenkins@review|infra@lists|jenkins@openstack)' + if git_dir is None: + git_dir = _get_git_directory() + if git_dir: + authors = [] + + # don't include jenkins email address in AUTHORS file + git_log_cmd = ['log', '--use-mailmap', '--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_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 if signed] + + authors += co_authors + authors = sorted(set(authors)) + + with open(new_authors, 'wb') as new_authors_fh: + if os.path.exists(old_authors): + with open(old_authors, "rb") as old_authors_fh: + new_authors_fh.write(old_authors_fh.read()) + new_authors_fh.write(('\n'.join(authors) + '\n') + .encode('utf-8')) def _find_git_files(dirname='', git_dir=None): @@ -675,9 +660,9 @@ autoindex_filename = os.path.join(source_dir, 'autoindex.rst') with open(autoindex_filename, 'w') as autoindex: autoindex.write(""".. toctree:: - :maxdepth: 1 + :maxdepth: 1 -""") + """) for module in module_list: output_filename = os.path.join(source_dir, "%s.rst" % module) @@ -807,7 +792,7 @@ """ git_dir = _get_git_directory() - if git_dir and _git_is_installed(): + if git_dir: if pre_version: try: return _run_git_command( diff -Nru python-pbr-0.9.0/pbr/testr_command.py python-pbr-0.7.0/pbr/testr_command.py --- python-pbr-0.9.0/pbr/testr_command.py 2014-07-07 15:43:49.000000000 +0000 +++ python-pbr-0.7.0/pbr/testr_command.py 2014-03-18 14:08:07.000000000 +0000 @@ -40,14 +40,11 @@ from distutils import cmd import distutils.errors -import logging import os import sys from testrepository import commands -logger = logging.getLogger(__name__) - class Testr(cmd.Command): @@ -57,17 +54,14 @@ ('coverage', None, "Replace PYTHON with coverage and merge coverage " "from each testr worker."), ('testr-args=', 't', "Run 'testr' with these args"), - ('omit=', 'o', "Files to omit from coverage calculations"), - ('coverage-package-name=', None, "Use this name for coverage package"), + ('omit=', 'o', 'Files to omit from coverage calculations'), ('slowest', None, "Show slowest test times after tests complete."), ('no-parallel', None, "Run testr serially"), - ('log-level=', 'l', "Log level (default: info)"), ] boolean_options = ['coverage', 'slowest', 'no_parallel'] def _run_testr(self, *args): - logger.debug("_run_testr called with args = %r", args) return commands.run_argv([sys.argv[0]] + list(args), sys.stdin, sys.stdout, sys.stderr) @@ -76,28 +70,18 @@ self.coverage = None self.omit = "" self.slowest = None - self.coverage_package_name = None self.no_parallel = None - self.log_level = 'info' def finalize_options(self): - self.log_level = getattr( - logging, - self.log_level.upper(), - logging.INFO) - logging.basicConfig(level=self.log_level) - logger.debug("finalize_options called") if self.testr_args is None: self.testr_args = [] else: self.testr_args = self.testr_args.split() if self.omit: self.omit = "--omit=%s" % self.omit - logger.debug("finalize_options: self.__dict__ = %r", self.__dict__) def run(self): """Set up testr repo, then run testr""" - logger.debug("run called") if not os.path.isdir(".testrepository"): self._run_testr("init") @@ -117,19 +101,12 @@ self._coverage_after() def _coverage_before(self): - logger.debug("_coverage_before called") package = self.distribution.get_name() if package.startswith('python-'): package = package[7:] - - # Use this as coverage package name - if self.coverage_package_name: - package = self.coverage_package_name options = "--source %s --parallel-mode" % package os.environ['PYTHON'] = ("coverage run %s" % options) - logger.debug("os.environ['PYTHON'] = %r", os.environ['PYTHON']) def _coverage_after(self): - logger.debug("_coverage_after called") os.system("coverage combine") os.system("coverage html -d ./cover %s" % self.omit) diff -Nru python-pbr-0.9.0/pbr/tests/base.py python-pbr-0.7.0/pbr/tests/base.py --- python-pbr-0.9.0/pbr/tests/base.py 2014-07-07 15:43:49.000000000 +0000 +++ python-pbr-0.7.0/pbr/tests/base.py 2014-03-18 14:08:07.000000000 +0000 @@ -92,10 +92,6 @@ self.log_fixture = self.useFixture( fixtures.FakeLogger('pbr')) - # Older git does not have config --local, so create a temporary home - # directory to permit using git config --global without stepping on - # developer configuration. - self.useFixture(fixtures.TempHomeDir()) self.useFixture(fixtures.NestedTempfile()) self.useFixture(fixtures.FakeLogger()) self.useFixture(fixtures.EnvironmentVariable('PBR_VERSION', '0.0')) @@ -116,24 +112,17 @@ k.startswith('pbr_testpackage.')): del sys.modules[k] - def run_setup(self, *args, **kwargs): - return self._run_cmd(sys.executable, ('setup.py',) + args, **kwargs) + def run_setup(self, *args): + return self._run_cmd(sys.executable, ('setup.py',) + args) - def _run_cmd(self, cmd, args=[], allow_fail=True, cwd=None): + 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. - - :param cwd: If falsy run within the test package dir, otherwise run - within the named path. """ - cwd = cwd or self.package_dir - result = _run_cmd([cmd] + list(args), cwd=cwd) - if result[2] and not allow_fail: - raise Exception("Command failed retcode=%s" % result[2]) - return result + return _run_cmd([cmd] + list(args), cwd=self.package_dir) def _run_cmd(args, cwd): diff -Nru python-pbr-0.9.0/pbr/tests/test_packaging.py python-pbr-0.7.0/pbr/tests/test_packaging.py --- python-pbr-0.9.0/pbr/tests/test_packaging.py 2014-07-07 15:43:49.000000000 +0000 +++ python-pbr-0.7.0/pbr/tests/test_packaging.py 2014-03-18 14:08:07.000000000 +0000 @@ -39,7 +39,6 @@ # BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS import os -import tempfile import fixtures import mock @@ -48,37 +47,18 @@ from pbr.tests import base -class TestRepo(fixtures.Fixture): - """A git repo for testing with. - - Use of TempHomeDir with this fixture is strongly recommended as due to the - lack of config --local in older gits, it will write to the users global - configuration without TempHomeDir. - """ - - def __init__(self, basedir): - super(TestRepo, self).__init__() - self._basedir = basedir - - def setUp(self): - super(TestRepo, self).setUp() - base._run_cmd(['git', 'init', '.'], self._basedir) - base._run_cmd( - ['git', 'config', '--global', 'user.email', 'example@example.com'], - self._basedir) - base._run_cmd(['git', 'add', '.'], self._basedir) - - def commit(self): - base._run_cmd(['git', 'commit', '-m', 'test commit'], self._basedir) - - class TestPackagingInGitRepoWithCommit(base.BaseTestCase): def setUp(self): super(TestPackagingInGitRepoWithCommit, self).setUp() - repo = self.useFixture(TestRepo(self.package_dir)) - repo.commit() - self.run_setup('sdist', allow_fail=False) + 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']) + self.run_setup('sdist') + return def test_authors(self): # One commit, something should be in the authors list @@ -97,8 +77,10 @@ def setUp(self): super(TestPackagingInGitRepoWithoutCommit, self).setUp() - self.useFixture(TestRepo(self.package_dir)) - self.run_setup('sdist', allow_fail=False) + self._run_cmd('git', ['init', '.']) + self._run_cmd('git', ['add', '.']) + self.run_setup('sdist') + return def test_authors(self): # No commits, no authors in list @@ -117,7 +99,8 @@ def setUp(self): super(TestPackagingInPlainDirectory, self).setUp() - self.run_setup('sdist', allow_fail=False) + self.run_setup('sdist') + return def test_authors(self): # Not a git repo, no AUTHORS file created @@ -143,17 +126,3 @@ '_run_shell_command') as _command: _command.side_effect = OSError self.assertEqual(False, packaging._git_is_installed()) - - -class TestNestedRequirements(base.BaseTestCase): - - def test_nested_requirement(self): - tempdir = tempfile.mkdtemp() - requirements = os.path.join(tempdir, 'requirements.txt') - nested = os.path.join(tempdir, 'nested.txt') - with open(requirements, 'w') as f: - f.write('-r ' + nested) - with open(nested, 'w') as f: - f.write('pbr') - result = packaging.parse_requirements([requirements]) - self.assertEqual(result, ['pbr']) diff -Nru python-pbr-0.9.0/pbr/tests/test_setup.py python-pbr-0.7.0/pbr/tests/test_setup.py --- python-pbr-0.9.0/pbr/tests/test_setup.py 2014-07-07 15:43:49.000000000 +0000 +++ python-pbr-0.7.0/pbr/tests/test_setup.py 2014-03-18 14:08:07.000000000 +0000 @@ -151,7 +151,7 @@ co_author_by = u"Co-authored-by: " + co_author git_log_cmd = ( - "git --git-dir=%s log --format=%%aN <%%aE>" + "git --git-dir=%s log --use-mailmap --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" diff -Nru python-pbr-0.9.0/pbr.egg-info/entry_points.txt python-pbr-0.7.0/pbr.egg-info/entry_points.txt --- python-pbr-0.9.0/pbr.egg-info/entry_points.txt 2014-07-07 15:44:21.000000000 +0000 +++ python-pbr-0.7.0/pbr.egg-info/entry_points.txt 2014-03-18 14:08:30.000000000 +0000 @@ -1,6 +1,3 @@ -[distutils.commands] -testr = pbr.testr_command:Testr - [distutils.setup_keywords] pbr = pbr.core:pbr diff -Nru python-pbr-0.9.0/pbr.egg-info/PKG-INFO python-pbr-0.7.0/pbr.egg-info/PKG-INFO --- python-pbr-0.9.0/pbr.egg-info/PKG-INFO 2014-07-07 15:44:21.000000000 +0000 +++ python-pbr-0.7.0/pbr.egg-info/PKG-INFO 2014-03-18 14:08:30.000000000 +0000 @@ -1,6 +1,6 @@ Metadata-Version: 1.1 Name: pbr -Version: 0.9.0 +Version: 0.7.0 Summary: Python Build Reasonableness Home-page: http://pypi.python.org/pypi/pbr Author: OpenStack @@ -11,58 +11,52 @@ PBR is a library that injects some useful and sensible default behaviors into your setuptools run. It started off life as the chunks of code that - were copied between all of the `OpenStack`_ projects. Around the time that + were copied between all of the OpenStack projects. Around the time that OpenStack hit 18 different projects each with at least 3 active branches, - it seemed like a good time to make that code into a proper reusable library. + it seems like a good time to make that code into a proper re-usable library. PBR is only mildly configurable. The basic idea is that there's a decent way to run things and if you do, you should reap the rewards, because then it's simple and repeatable. If you want to do things differently, cool! But - you've already got the power of Python at your fingertips, so you don't + you've already got the power of python at your fingertips, so you don't really need PBR. - PBR builds on top of the work that `d2to1`_ started to provide for declarative - configuration. `d2to1`_ is itself an implementation of the ideas behind - `distutils2`_. Although `distutils2`_ is now abandoned in favor of work towards - `PEP 426`_ and Metadata 2.0, declarative config is still a great idea and + PBR builds on top of the work that `d2to1` started to provide for declarative + configuration. `d2to1` is itself an implementation of the ideas behind + `distutils2`. Although `distutils2` is now abandoned in favor of work towards + PEP 426 and Metadata 2.0, declarative config is still a great idea and specifically important in trying to distribute setup code as a library when that library itself will alter how the setup is processed. As Metadata - 2.0 and other modern Python packaging PEPs come out, PBR aims to support + 2.0 and other modern Python packaging PEPs come out, `pbr` aims to support them as quickly as possible. You can read more in `the documentation`_. Running Tests ============= - The testing system is based on a combination of `tox`_ and `testr`_. The canonical - approach to running tests is to simply run the command ``tox``. This will - create virtual environments, populate them with dependencies and run all of + The testing system is based on a combination of tox and testr. The canonical + approach to running tests is to simply run the command `tox`. This will + create virtual environments, populate them with depenedencies and run all of the tests that OpenStack CI systems run. Behind the scenes, tox is running - ``testr run --parallel``, but is set up such that you can supply any additional + `testr run --parallel`, but is set up such that you can supply any additional testr arguments that are needed to tox. For example, you can run: - ``tox -- --analyze-isolation`` to cause tox to tell testr to add - ``--analyze-isolation`` to its argument list. + `tox -- --analyze-isolation` to cause tox to tell testr to add + --analyze-isolation to its argument list. It is also possible to run the tests inside of a virtual environment you have created, or it is possible that you have all of the dependencies installed locally already. If you'd like to go this route, the requirements - are listed in ``requirements.txt`` and the requirements for testing are in - ``test-requirements.txt``. Installing them via pip, for instance, is simply:: + are listed in requirements.txt and the requirements for testing are in + test-requirements.txt. Installing them via pip, for instance, is simply:: pip install -r requirements.txt -r test-requirements.txt In you go this route, you can interact with the testr command directly. - Running ``testr run`` will run the entire test suite. ``testr run --parallel`` - will run it in parallel (this is the default incantation tox uses). More + Running `testr run` will run the entire test suite. `testr run --parallel` + will run it in parallel (this is the default incantation tox uses.) More information about testr can be found at: http://wiki.openstack.org/testr - .. _OpenStack: https://www.openstack.org/ .. _`the documentation`: http://docs.openstack.org/developer/pbr/ - .. _tox: http://tox.testrun.org/ - .. _d2to1: https://pypi.python.org/pypi/d2to1 - .. _distutils2: https://pypi.python.org/pypi/Distutils2 - .. _PEP 426: http://legacy.python.org/dev/peps/pep-0426/ - .. _testr: https://wiki.openstack.org/wiki/Testr Platform: UNKNOWN diff -Nru python-pbr-0.9.0/pbr.egg-info/requires.txt python-pbr-0.7.0/pbr.egg-info/requires.txt --- python-pbr-0.9.0/pbr.egg-info/requires.txt 2014-07-07 15:44:21.000000000 +0000 +++ python-pbr-0.7.0/pbr.egg-info/requires.txt 2014-03-18 14:08:30.000000000 +0000 @@ -1 +1 @@ -pip \ No newline at end of file +pip>=1.4 \ No newline at end of file diff -Nru python-pbr-0.9.0/PKG-INFO python-pbr-0.7.0/PKG-INFO --- python-pbr-0.9.0/PKG-INFO 2014-07-07 15:44:21.000000000 +0000 +++ python-pbr-0.7.0/PKG-INFO 2014-03-18 14:08:30.000000000 +0000 @@ -1,6 +1,6 @@ Metadata-Version: 1.1 Name: pbr -Version: 0.9.0 +Version: 0.7.0 Summary: Python Build Reasonableness Home-page: http://pypi.python.org/pypi/pbr Author: OpenStack @@ -11,58 +11,52 @@ PBR is a library that injects some useful and sensible default behaviors into your setuptools run. It started off life as the chunks of code that - were copied between all of the `OpenStack`_ projects. Around the time that + were copied between all of the OpenStack projects. Around the time that OpenStack hit 18 different projects each with at least 3 active branches, - it seemed like a good time to make that code into a proper reusable library. + it seems like a good time to make that code into a proper re-usable library. PBR is only mildly configurable. The basic idea is that there's a decent way to run things and if you do, you should reap the rewards, because then it's simple and repeatable. If you want to do things differently, cool! But - you've already got the power of Python at your fingertips, so you don't + you've already got the power of python at your fingertips, so you don't really need PBR. - PBR builds on top of the work that `d2to1`_ started to provide for declarative - configuration. `d2to1`_ is itself an implementation of the ideas behind - `distutils2`_. Although `distutils2`_ is now abandoned in favor of work towards - `PEP 426`_ and Metadata 2.0, declarative config is still a great idea and + PBR builds on top of the work that `d2to1` started to provide for declarative + configuration. `d2to1` is itself an implementation of the ideas behind + `distutils2`. Although `distutils2` is now abandoned in favor of work towards + PEP 426 and Metadata 2.0, declarative config is still a great idea and specifically important in trying to distribute setup code as a library when that library itself will alter how the setup is processed. As Metadata - 2.0 and other modern Python packaging PEPs come out, PBR aims to support + 2.0 and other modern Python packaging PEPs come out, `pbr` aims to support them as quickly as possible. You can read more in `the documentation`_. Running Tests ============= - The testing system is based on a combination of `tox`_ and `testr`_. The canonical - approach to running tests is to simply run the command ``tox``. This will - create virtual environments, populate them with dependencies and run all of + The testing system is based on a combination of tox and testr. The canonical + approach to running tests is to simply run the command `tox`. This will + create virtual environments, populate them with depenedencies and run all of the tests that OpenStack CI systems run. Behind the scenes, tox is running - ``testr run --parallel``, but is set up such that you can supply any additional + `testr run --parallel`, but is set up such that you can supply any additional testr arguments that are needed to tox. For example, you can run: - ``tox -- --analyze-isolation`` to cause tox to tell testr to add - ``--analyze-isolation`` to its argument list. + `tox -- --analyze-isolation` to cause tox to tell testr to add + --analyze-isolation to its argument list. It is also possible to run the tests inside of a virtual environment you have created, or it is possible that you have all of the dependencies installed locally already. If you'd like to go this route, the requirements - are listed in ``requirements.txt`` and the requirements for testing are in - ``test-requirements.txt``. Installing them via pip, for instance, is simply:: + are listed in requirements.txt and the requirements for testing are in + test-requirements.txt. Installing them via pip, for instance, is simply:: pip install -r requirements.txt -r test-requirements.txt In you go this route, you can interact with the testr command directly. - Running ``testr run`` will run the entire test suite. ``testr run --parallel`` - will run it in parallel (this is the default incantation tox uses). More + Running `testr run` will run the entire test suite. `testr run --parallel` + will run it in parallel (this is the default incantation tox uses.) More information about testr can be found at: http://wiki.openstack.org/testr - .. _OpenStack: https://www.openstack.org/ .. _`the documentation`: http://docs.openstack.org/developer/pbr/ - .. _tox: http://tox.testrun.org/ - .. _d2to1: https://pypi.python.org/pypi/d2to1 - .. _distutils2: https://pypi.python.org/pypi/Distutils2 - .. _PEP 426: http://legacy.python.org/dev/peps/pep-0426/ - .. _testr: https://wiki.openstack.org/wiki/Testr Platform: UNKNOWN diff -Nru python-pbr-0.9.0/README.rst python-pbr-0.7.0/README.rst --- python-pbr-0.9.0/README.rst 2014-07-07 15:43:49.000000000 +0000 +++ python-pbr-0.7.0/README.rst 2014-03-18 14:08:07.000000000 +0000 @@ -3,55 +3,49 @@ PBR is a library that injects some useful and sensible default behaviors into your setuptools run. It started off life as the chunks of code that -were copied between all of the `OpenStack`_ projects. Around the time that +were copied between all of the OpenStack projects. Around the time that OpenStack hit 18 different projects each with at least 3 active branches, -it seemed like a good time to make that code into a proper reusable library. +it seems like a good time to make that code into a proper re-usable library. PBR is only mildly configurable. The basic idea is that there's a decent way to run things and if you do, you should reap the rewards, because then it's simple and repeatable. If you want to do things differently, cool! But -you've already got the power of Python at your fingertips, so you don't +you've already got the power of python at your fingertips, so you don't really need PBR. -PBR builds on top of the work that `d2to1`_ started to provide for declarative -configuration. `d2to1`_ is itself an implementation of the ideas behind -`distutils2`_. Although `distutils2`_ is now abandoned in favor of work towards -`PEP 426`_ and Metadata 2.0, declarative config is still a great idea and +PBR builds on top of the work that `d2to1` started to provide for declarative +configuration. `d2to1` is itself an implementation of the ideas behind +`distutils2`. Although `distutils2` is now abandoned in favor of work towards +PEP 426 and Metadata 2.0, declarative config is still a great idea and specifically important in trying to distribute setup code as a library when that library itself will alter how the setup is processed. As Metadata -2.0 and other modern Python packaging PEPs come out, PBR aims to support +2.0 and other modern Python packaging PEPs come out, `pbr` aims to support them as quickly as possible. You can read more in `the documentation`_. Running Tests ============= -The testing system is based on a combination of `tox`_ and `testr`_. The canonical -approach to running tests is to simply run the command ``tox``. This will -create virtual environments, populate them with dependencies and run all of +The testing system is based on a combination of tox and testr. The canonical +approach to running tests is to simply run the command `tox`. This will +create virtual environments, populate them with depenedencies and run all of the tests that OpenStack CI systems run. Behind the scenes, tox is running -``testr run --parallel``, but is set up such that you can supply any additional +`testr run --parallel`, but is set up such that you can supply any additional testr arguments that are needed to tox. For example, you can run: -``tox -- --analyze-isolation`` to cause tox to tell testr to add -``--analyze-isolation`` to its argument list. +`tox -- --analyze-isolation` to cause tox to tell testr to add +--analyze-isolation to its argument list. It is also possible to run the tests inside of a virtual environment you have created, or it is possible that you have all of the dependencies installed locally already. If you'd like to go this route, the requirements -are listed in ``requirements.txt`` and the requirements for testing are in -``test-requirements.txt``. Installing them via pip, for instance, is simply:: +are listed in requirements.txt and the requirements for testing are in +test-requirements.txt. Installing them via pip, for instance, is simply:: pip install -r requirements.txt -r test-requirements.txt In you go this route, you can interact with the testr command directly. -Running ``testr run`` will run the entire test suite. ``testr run --parallel`` -will run it in parallel (this is the default incantation tox uses). More +Running `testr run` will run the entire test suite. `testr run --parallel` +will run it in parallel (this is the default incantation tox uses.) More information about testr can be found at: http://wiki.openstack.org/testr -.. _OpenStack: https://www.openstack.org/ .. _`the documentation`: http://docs.openstack.org/developer/pbr/ -.. _tox: http://tox.testrun.org/ -.. _d2to1: https://pypi.python.org/pypi/d2to1 -.. _distutils2: https://pypi.python.org/pypi/Distutils2 -.. _PEP 426: http://legacy.python.org/dev/peps/pep-0426/ -.. _testr: https://wiki.openstack.org/wiki/Testr diff -Nru python-pbr-0.9.0/requirements.txt python-pbr-0.7.0/requirements.txt --- python-pbr-0.9.0/requirements.txt 2014-07-07 15:43:49.000000000 +0000 +++ python-pbr-0.7.0/requirements.txt 2014-03-18 14:08:07.000000000 +0000 @@ -1 +1 @@ -pip +pip>=1.4 diff -Nru python-pbr-0.9.0/setup.cfg python-pbr-0.7.0/setup.cfg --- python-pbr-0.9.0/setup.cfg 2014-07-07 15:44:21.000000000 +0000 +++ python-pbr-0.7.0/setup.cfg 2014-03-18 14:08:30.000000000 +0000 @@ -36,8 +36,6 @@ [entry_points] distutils.setup_keywords = pbr = pbr.core:pbr -distutils.commands = - testr = pbr.testr_command:Testr [build_sphinx] all_files = 1 diff -Nru python-pbr-0.9.0/test-requirements.txt python-pbr-0.7.0/test-requirements.txt --- python-pbr-0.9.0/test-requirements.txt 2014-07-07 15:43:49.000000000 +0000 +++ python-pbr-0.7.0/test-requirements.txt 2014-03-18 14:08:07.000000000 +0000 @@ -1,7 +1,7 @@ coverage>=3.6 discover fixtures>=0.3.14 -hacking>=0.8,<0.9 +flake8==2.0 mock>=1.0 python-subunit>=0.0.18 sphinx>=1.1.2,<1.2 diff -Nru python-pbr-0.9.0/tools/integration.sh python-pbr-0.7.0/tools/integration.sh --- python-pbr-0.9.0/tools/integration.sh 2014-07-07 15:43:49.000000000 +0000 +++ python-pbr-0.7.0/tools/integration.sh 2014-03-18 14:08:07.000000000 +0000 @@ -43,14 +43,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 libldap2-dev libsasl2-dev ccache - -# FOR numpy / pyyaml -sudo apt-get build-dep -y --force-yes python-numpy -sudo apt-get build-dep -y --force-yes python-yaml - -# And use ccache explitly -export PATH=/usr/lib/ccache:$PATH +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) @@ -100,7 +93,7 @@ exit 1 fi -sudo rm -f /etc/apache2/sites-enabled/* +sudo rm /etc/apache2/sites-enabled/* cat < $tmpdir/pypi.conf ServerAdmin webmaster@localhost @@ -108,26 +101,11 @@ Options Indexes FollowSymLinks EOF - -# NOTE(dhellmann): This logic is copied from apache_site_config_for -# devstack/lib/apache with non-Ubuntu OSes left out because we don't -# run this integration test anywhere else for now. -apache_version=$(/usr/sbin/apache2ctl -v | awk '/Server version/ {print $3}' | cut -f2 -d/) -if [[ "$apache_version" =~ ^2\.2\. ]] -then - # Ubuntu 12.04 - Apache 2.2 - apache_conf=/etc/apache2/sites-available/pypi -else - # Ubuntu 14.04 - Apache 2.4 - apache_conf=/etc/apache2/sites-available/pypi.conf -fi -sudo mv $tmpdir/pypi.conf $apache_conf -sudo chown root:root $apache_conf +sudo mv $tmpdir/pypi.conf /etc/apache2/sites-available/pypi +sudo chown root:root /etc/apache2/sites-available/pypi sudo a2ensite pypi sudo service apache2 reload -#BRANCH -BRANCH=${OVERRIDE_ZUUL_BRANCH=:-master} # PROJECTS is a list of projects that we're testing PROJECTS=$* @@ -139,7 +117,7 @@ # --no-update is passed as well. The one thing the -b # does give us is it makes run-mirror install dependencies # once instead of over and over for all branches it can find. -$pypimirrorvenv/bin/run-mirror -b remotes/origin/$BRANCH --no-update --verbose -c $tmpdir/mirror.yaml --no-process --export=$HOME/mirror_package_list.txt +$pypimirrorvenv/bin/run-mirror -b remotes/origin/master --no-update --verbose -c $tmpdir/mirror.yaml --no-process --export=$HOME/mirror_package_list.txt # Compare packages in the mirror with the list of requirements gen_bare_package_list "$REPODIR/requirements/global-requirements.txt $REPODIR/requirements/dev-requirements.txt" > bare_all_requirements.txt gen_bare_package_list $HOME/mirror_package_list.txt > bare_mirror_package_list.txt @@ -152,7 +130,7 @@ $pypimirrorvenv/bin/pip install -i http://pypi.python.org/simple -d $tmpdownload/pip/openstack -r requirements.txt $pypimirrorvenv/bin/python setup.py sdist -d $tmpdownload/pip/openstack -$pypimirrorvenv/bin/run-mirror -b remotes/origin/$BRANCH --no-update --verbose -c $tmpdir/mirror.yaml --no-download +$pypimirrorvenv/bin/run-mirror -b remotes/origin/master --no-update --verbose -c $tmpdir/mirror.yaml --no-download find $pypidir -type f -name '*.html' -delete find $pypidir diff -Nru python-pbr-0.9.0/tox.ini python-pbr-0.7.0/tox.ini --- python-pbr-0.9.0/tox.ini 2014-07-07 15:43:49.000000000 +0000 +++ python-pbr-0.7.0/tox.ini 2014-03-18 14:08:07.000000000 +0000 @@ -19,7 +19,8 @@ [testenv:pep8] deps = -r{toxinidir}/requirements.txt -r{toxinidir}/test-requirements.txt -commands = flake8 {posargs} + hacking +commands = flake8 [testenv:cover] setenv = VIRTUAL_ENV={envdir}