Hello community,
here is the log from the commit of package python-pbr for openSUSE:Factory checked in at 2014-08-05 13:00:14
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
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 2014-03-30 12:25:46.000000000 +0200
+++ /work/SRC/openSUSE:Factory/.python-pbr.new/python-pbr.changes 2014-08-05 13:00:21.000000000 +0200
@@ -1,0 +2,36 @@
+Thu Jul 31 16:25:10 UTC 2014 - dimstar@opensuse.org
+
+- Rename rpmlintrc to %{name}-rpmlintrc.
+ Follow the packaging guidelines.
+
+-------------------------------------------------------------------
+Sat Jul 26 15:17:14 UTC 2014 - tbechtold@suse.com
+
+- Update BuildRequires according to test-requirements.txt
+- Update to version 0.10.0
+ * Remove all 2.7 filtering
+ * Stop filtering out argparse
+ * Remove mirror testing from the integration script
+ 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
+
+-------------------------------------------------------------------
Old:
----
pbr-0.8.0.tar.gz
rpmlintrc
New:
----
pbr-0.10.0.tar.gz
python-pbr-rpmlintrc
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ python-pbr.spec ++++++
--- /var/tmp/diff_new_pack.EKX4zD/_old 2014-08-05 13:00:23.000000000 +0200
+++ /var/tmp/diff_new_pack.EKX4zD/_new 2014-08-05 13:00:23.000000000 +0200
@@ -21,13 +21,14 @@
%bcond_with test
Name: python-pbr
-Version: 0.8.0
+Version: 0.10.0
Release: 0
Summary: Python Build Reasonableness
License: Apache-2.0
Group: Development/Languages/Python
Url: http://pypi.python.org/pypi/pbr
Source: https://pypi.python.org/packages/source/p/pbr/pbr-%{version}.tar.gz
+Source1: python-pbr-rpmlintrc
BuildRequires: python-devel
# Documentation requirements:
BuildRequires: python-Sphinx >= 1.1.2
@@ -38,9 +39,10 @@
BuildRequires: python-discover
%endif
BuildRequires: python-fixtures >= 0.3.14
+BuildRequires: python-hacking >=0.8
BuildRequires: python-mock >= 1.0
BuildRequires: python-python-subunit >= 0.0.18
-BuildRequires: python-testrepository >= 0.0.17
+BuildRequires: python-testrepository >= 0.0.18
BuildRequires: python-testresources >= 0.2.4
BuildRequires: python-testscenarios >= 0.4
BuildRequires: python-testtools >= 0.9.34
++++++ pbr-0.8.0.tar.gz -> pbr-0.10.0.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pbr-0.8.0/AUTHORS new/pbr-0.10.0/AUTHORS
--- old/pbr-0.8.0/AUTHORS 2014-03-27 23:09:03.000000000 +0100
+++ new/pbr-0.10.0/AUTHORS 2014-07-21 20:07:10.000000000 +0200
@@ -1 +1,74 @@
-
+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 -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pbr-0.8.0/ChangeLog new/pbr-0.10.0/ChangeLog
--- old/pbr-0.8.0/ChangeLog 2014-03-27 23:09:03.000000000 +0100
+++ new/pbr-0.10.0/ChangeLog 2014-07-21 20:07:10.000000000 +0200
@@ -1,13 +1,52 @@
CHANGES
=======
+0.10.0
+------
+
+* Remove all 2.7 filtering
+* Stop filtering out argparse
+* Remove mirror testing from the integration script
+
+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 -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pbr-0.8.0/PKG-INFO new/pbr-0.10.0/PKG-INFO
--- old/pbr-0.8.0/PKG-INFO 2014-03-27 23:09:03.000000000 +0100
+++ new/pbr-0.10.0/PKG-INFO 2014-07-21 20:07:10.000000000 +0200
@@ -1,6 +1,6 @@
Metadata-Version: 1.1
Name: pbr
-Version: 0.8.0
+Version: 0.10.0
Summary: Python Build Reasonableness
Home-page: http://pypi.python.org/pypi/pbr
Author: OpenStack
@@ -11,52 +11,58 @@
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 seems like a good time to make that code into a proper re-usable library.
+ it seemed like a good time to make that code into a proper reusable 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 depenedencies 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 dependencies 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 -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pbr-0.8.0/README.rst new/pbr-0.10.0/README.rst
--- old/pbr-0.8.0/README.rst 2014-03-27 23:08:41.000000000 +0100
+++ new/pbr-0.10.0/README.rst 2014-07-21 20:06:25.000000000 +0200
@@ -3,49 +3,55 @@
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 seems like a good time to make that code into a proper re-usable library.
+it seemed like a good time to make that code into a proper reusable 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 depenedencies 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 dependencies 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 -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pbr-0.8.0/doc/source/index.rst new/pbr-0.10.0/doc/source/index.rst
--- old/pbr-0.8.0/doc/source/index.rst 2014-03-27 23:08:41.000000000 +0100
+++ new/pbr-0.10.0/doc/source/index.rst 2014-07-21 20:06:25.000000000 +0200
@@ -32,6 +32,11 @@
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
@@ -60,10 +65,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
-popuplate a virtualenv for testing, or to just install everything you need.
+populate 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 approprirately, and inject
+your project, will parse them and split them up appropriately, and inject
them into the install_requires and/or tests_require and/or dependency_links
arguments to setup. Voila!
@@ -95,14 +100,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 reuable form
+ summary = OpenStack's setup automation in a reusable form
description-file = README
license = Apache-2
classifier =
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pbr-0.8.0/doc/source/packagers.rst new/pbr-0.10.0/doc/source/packagers.rst
--- old/pbr-0.8.0/doc/source/packagers.rst 2014-03-27 23:08:41.000000000 +0100
+++ new/pbr-0.10.0/doc/source/packagers.rst 2014-07-21 20:06:25.000000000 +0200
@@ -57,3 +57,25 @@
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 -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pbr-0.8.0/doc/source/semver.rst new/pbr-0.10.0/doc/source/semver.rst
--- old/pbr-0.8.0/doc/source/semver.rst 2014-03-27 23:08:41.000000000 +0100
+++ new/pbr-0.10.0/doc/source/semver.rst 2014-07-21 20:06:25.000000000 +0200
@@ -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 hypen in ways that
+Versioning in that it does not employ the use of the hyphen 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
- indentifier immediately following the patch version.
+ identifier 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 version.
+ identifier immediately following a development or pre-release 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 -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pbr-0.8.0/pbr/core.py new/pbr-0.10.0/pbr/core.py
--- old/pbr-0.8.0/pbr/core.py 2014-03-27 23:08:41.000000000 +0100
+++ new/pbr-0.10.0/pbr/core.py 2014-07-21 20:06:25.000000000 +0200
@@ -40,6 +40,7 @@
from distutils import core
from distutils import errors
+import logging
import os
import sys
import warnings
@@ -49,7 +50,17 @@
from pbr import util
-core.Distribution = dist._get_unpatched(core.Distribution)
+_saved_core_distribution = core.Distribution
+
+
+def _monkeypatch_distribution():
+ core.Distribution = dist._get_unpatched(core.Distribution)
+
+
+def _restore_distribution_monkeypatch():
+ core.Distribution = _saved_core_distribution
+
+
if sys.version_info[0] == 3:
string_type = str
integer_types = (int,)
@@ -76,52 +87,63 @@
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:
- 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))
+ _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()
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pbr-0.8.0/pbr/packaging.py new/pbr-0.10.0/pbr/packaging.py
--- old/pbr-0.8.0/pbr/packaging.py 2014-03-27 23:08:42.000000000 +0100
+++ new/pbr-0.10.0/pbr/packaging.py 2014-07-21 20:06:27.000000000 +0200
@@ -49,9 +49,6 @@
TRUE_VALUES = ('true', '1', 'yes')
REQUIREMENTS_FILES = ('requirements.txt', 'tools/pip-requires')
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', 'ordereddict')
def get_requirements_files():
@@ -125,6 +122,13 @@
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:
@@ -146,10 +150,6 @@
elif re.match(r'\s*-f\s+', line):
line = None
reason = 'Index Location'
- elif (project_name and
- project_name in BROKEN_ON_27 and sys.version_info >= (2, 7)):
- line = None
- reason = 'Python 2.6 only dependency'
if line is not None:
requirements.append(line)
@@ -246,95 +246,101 @@
"""Write a changelog based on the git changelog."""
should_skip = get_boolean_option(option_dict, 'skip_changelog',
'SKIP_WRITE_GIT_CHANGELOG')
- 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('\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 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
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 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'))
+ 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'))
def _find_git_files(dirname='', git_dir=None):
@@ -662,9 +668,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)
@@ -794,7 +800,7 @@
"""
git_dir = _get_git_directory()
- if git_dir:
+ if git_dir and _git_is_installed():
if pre_version:
try:
return _run_git_command(
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pbr-0.8.0/pbr/testr_command.py new/pbr-0.10.0/pbr/testr_command.py
--- old/pbr-0.8.0/pbr/testr_command.py 2014-03-27 23:08:41.000000000 +0100
+++ new/pbr-0.10.0/pbr/testr_command.py 2014-07-21 20:06:25.000000000 +0200
@@ -40,11 +40,14 @@
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):
@@ -54,14 +57,17 @@
('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'),
+ ('omit=', 'o', "Files to omit from coverage calculations"),
+ ('coverage-package-name=', None, "Use this name for coverage package"),
('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)
@@ -70,18 +76,28 @@
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")
@@ -101,12 +117,19 @@
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 -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pbr-0.8.0/pbr/tests/base.py new/pbr-0.10.0/pbr/tests/base.py
--- old/pbr-0.8.0/pbr/tests/base.py 2014-03-27 23:08:41.000000000 +0100
+++ new/pbr-0.10.0/pbr/tests/base.py 2014-07-21 20:06:25.000000000 +0200
@@ -92,6 +92,10 @@
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'))
@@ -112,17 +116,24 @@
k.startswith('pbr_testpackage.')):
del sys.modules[k]
- def run_setup(self, *args):
- return self._run_cmd(sys.executable, ('setup.py',) + args)
+ def run_setup(self, *args, **kwargs):
+ return self._run_cmd(sys.executable, ('setup.py',) + args, **kwargs)
- def _run_cmd(self, cmd, args=[]):
+ def _run_cmd(self, cmd, args=[], allow_fail=True, cwd=None):
"""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.
"""
- return _run_cmd([cmd] + list(args), cwd=self.package_dir)
+ 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
def _run_cmd(args, cwd):
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pbr-0.8.0/pbr/tests/test_packaging.py new/pbr-0.10.0/pbr/tests/test_packaging.py
--- old/pbr-0.8.0/pbr/tests/test_packaging.py 2014-03-27 23:08:41.000000000 +0100
+++ new/pbr-0.10.0/pbr/tests/test_packaging.py 2014-07-21 20:06:25.000000000 +0200
@@ -39,6 +39,7 @@
# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
import os
+import tempfile
import fixtures
import mock
@@ -47,18 +48,37 @@
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()
- 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
+ repo = self.useFixture(TestRepo(self.package_dir))
+ repo.commit()
+ self.run_setup('sdist', allow_fail=False)
def test_authors(self):
# One commit, something should be in the authors list
@@ -77,10 +97,8 @@
def setUp(self):
super(TestPackagingInGitRepoWithoutCommit, self).setUp()
- self._run_cmd('git', ['init', '.'])
- self._run_cmd('git', ['add', '.'])
- self.run_setup('sdist')
- return
+ self.useFixture(TestRepo(self.package_dir))
+ self.run_setup('sdist', allow_fail=False)
def test_authors(self):
# No commits, no authors in list
@@ -99,8 +117,7 @@
def setUp(self):
super(TestPackagingInPlainDirectory, self).setUp()
- self.run_setup('sdist')
- return
+ self.run_setup('sdist', allow_fail=False)
def test_authors(self):
# Not a git repo, no AUTHORS file created
@@ -126,3 +143,17 @@
'_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 -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pbr-0.8.0/pbr/tests/test_setup.py new/pbr-0.10.0/pbr/tests/test_setup.py
--- old/pbr-0.8.0/pbr/tests/test_setup.py 2014-03-27 23:08:41.000000000 +0100
+++ new/pbr-0.10.0/pbr/tests/test_setup.py 2014-07-21 20:06:27.000000000 +0200
@@ -151,7 +151,7 @@
co_author_by = u"Co-authored-by: " + co_author
git_log_cmd = (
- "git --git-dir=%s log --use-mailmap --format=%%aN <%%aE>"
+ "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"
@@ -304,26 +304,6 @@
fh.write("-f foobar")
self.assertEqual([], packaging.parse_requirements([self.tmp_file]))
- def test_parse_requirements_removes_argparse(self):
- with open(self.tmp_file, 'w') as fh:
- fh.write("argparse")
- if sys.version_info >= (2, 7):
- self.assertEqual([], packaging.parse_requirements([self.tmp_file]))
-
- def test_parse_requirements_removes_versioned_ordereddict(self):
- self.useFixture(fixtures.MonkeyPatch('sys.version_info', (2, 7)))
- with open(self.tmp_file, 'w') as fh:
- fh.write("ordereddict==1.0.1")
- self.assertEqual([], packaging.parse_requirements([self.tmp_file]))
-
- def test_parse_requirements_keeps_versioned_ordereddict(self):
- self.useFixture(fixtures.MonkeyPatch('sys.version_info', (2, 6)))
- with open(self.tmp_file, 'w') as fh:
- fh.write("ordereddict==1.0.1")
- self.assertEqual([
- "ordereddict==1.0.1"],
- packaging.parse_requirements([self.tmp_file]))
-
def test_parse_requirements_override_with_env(self):
with open(self.tmp_file, 'w') as fh:
fh.write("foo\nbar")
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pbr-0.8.0/pbr.egg-info/PKG-INFO new/pbr-0.10.0/pbr.egg-info/PKG-INFO
--- old/pbr-0.8.0/pbr.egg-info/PKG-INFO 2014-03-27 23:09:03.000000000 +0100
+++ new/pbr-0.10.0/pbr.egg-info/PKG-INFO 2014-07-21 20:07:10.000000000 +0200
@@ -1,6 +1,6 @@
Metadata-Version: 1.1
Name: pbr
-Version: 0.8.0
+Version: 0.10.0
Summary: Python Build Reasonableness
Home-page: http://pypi.python.org/pypi/pbr
Author: OpenStack
@@ -11,52 +11,58 @@
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 seems like a good time to make that code into a proper re-usable library.
+ it seemed like a good time to make that code into a proper reusable 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 depenedencies 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 dependencies 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 -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pbr-0.8.0/pbr.egg-info/entry_points.txt new/pbr-0.10.0/pbr.egg-info/entry_points.txt
--- old/pbr-0.8.0/pbr.egg-info/entry_points.txt 2014-03-27 23:09:03.000000000 +0100
+++ new/pbr-0.10.0/pbr.egg-info/entry_points.txt 2014-07-21 20:07:10.000000000 +0200
@@ -1,3 +1,6 @@
+[distutils.commands]
+testr = pbr.testr_command:Testr
+
[distutils.setup_keywords]
pbr = pbr.core:pbr
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pbr-0.8.0/setup.cfg new/pbr-0.10.0/setup.cfg
--- old/pbr-0.8.0/setup.cfg 2014-03-27 23:09:03.000000000 +0100
+++ new/pbr-0.10.0/setup.cfg 2014-07-21 20:07:10.000000000 +0200
@@ -36,6 +36,8 @@
[entry_points]
distutils.setup_keywords =
pbr = pbr.core:pbr
+distutils.commands =
+ testr = pbr.testr_command:Testr
[build_sphinx]
all_files = 1
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pbr-0.8.0/test-requirements.txt new/pbr-0.10.0/test-requirements.txt
--- old/pbr-0.8.0/test-requirements.txt 2014-03-27 23:08:41.000000000 +0100
+++ new/pbr-0.10.0/test-requirements.txt 2014-07-21 20:06:25.000000000 +0200
@@ -1,7 +1,7 @@
coverage>=3.6
discover
fixtures>=0.3.14
-flake8==2.0
+hacking>=0.8,<0.9
mock>=1.0
python-subunit>=0.0.18
sphinx>=1.1.2,<1.2
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pbr-0.8.0/tools/integration.sh new/pbr-0.10.0/tools/integration.sh
--- old/pbr-0.8.0/tools/integration.sh 2014-03-27 23:08:41.000000000 +0100
+++ new/pbr-0.10.0/tools/integration.sh 2014-07-21 20:06:25.000000000 +0200
@@ -8,34 +8,6 @@
$venv/bin/pip install -U pip wheel
}
-# This function takes a list of files that contains
-# a list of python packages (in pip freeze format) and
-# strips the version info from each entry.
-# $1 - The files containing python packages (with version).
-function gen_bare_package_list () {
- set +x
- IN_FILES=$1
- for FILE in $IN_FILES
- do
- while read line; do
- if [[ "$line" == "" ]] || [[ "$line" == \#* ]] || [[ "$line" == \-f* ]]; then
- continue
- elif [[ "$line" == \-e* ]]; then
- echo "${line#*=}"
- elif [[ "$line" == *\>* ]]; then
- echo "${line%%>*}"
- elif [[ "$line" == *\=* ]]; then
- echo "${line%%=*}"
- elif [[ "$line" == *\<* ]]; then
- echo "${line%%<*}"
- else
- echo "${line%%#*}"
- fi
- done < $FILE
- done
- set -x
-}
-
# BASE should be a directory with a subdir called "new" and in that
# dir, there should be a git repository for every entry in PROJECTS
BASE=${BASE:-/opt/stack}
@@ -43,68 +15,16 @@
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
+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
-tmpdir=$(mktemp -d)
+# FOR numpy / pyyaml
+sudo apt-get build-dep -y --force-yes python-numpy
+sudo apt-get build-dep -y --force-yes python-yaml
-whoami=$(whoami)
-tmpdownload=$tmpdir/download
-mkdir -p $tmpdownload
-
-pypidir=/var/www/pypi
-sudo mkdir -p $pypidir
-sudo chown $USER $pypidir
-
-pypimirrorvenv=$tmpdir/pypi-mirror
-
-sudo touch $HOME/pip.log
-sudo chown $USER $HOME/pip.log
-
-rm -f ~/.pip/pip.conf ~/.pydistutils.cfg
-mkdir -p ~/.pip
-cat <<EOF > ~/.pip/pip.conf
-[global]
-log = $HOME/pip.log
-EOF
-
-pypimirrorsourcedir=$tmpdir/pypimirrorsourcedir
-git clone $REPODIR/pypi-mirror $pypimirrorsourcedir
-
-mkvenv $pypimirrorvenv
-$pypimirrorvenv/bin/pip install -e $pypimirrorsourcedir
-
-cat <<EOF > $tmpdir/mirror.yaml
-cache-root: $tmpdownload
-
-mirrors:
- - name: openstack
- projects:
- - file://$REPODIR/requirements
- output: $pypidir
-EOF
-
-# wheel mirrors are below a dir level containing distro and release
-# because the wheel format itself does not distinguish
-distro=`lsb_release -i -r -s | xargs | tr ' ' '-'`
-
-# set up local apache to serve the mirror we're about to create
-if [ ! -d /etc/apache2/sites-enabled/ ] ; then
- echo "Apache does not seem to be installed!!!"
- exit 1
-fi
-
-sudo rm /etc/apache2/sites-enabled/*
-cat <<EOF > $tmpdir/pypi.conf
-
- ServerAdmin webmaster@localhost
- DocumentRoot /var/www
- Options Indexes FollowSymLinks
-</VirtualHost>
-EOF
-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
+# And use ccache explitly
+export PATH=/usr/lib/ccache:$PATH
+
+tmpdir=$(mktemp -d)
#BRANCH
BRANCH=${OVERRIDE_ZUUL_BRANCH=:-master}
@@ -115,46 +35,6 @@
git clone $REPODIR/pbr $pbrsdistdir
cd $pbrsdistdir
-# Note the -b argument here is essentially a noop as
-# --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
-# 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
-echo "Diff between python mirror packages and requirements packages:"
-grep -v -f bare_all_requirements.txt bare_mirror_package_list.txt > diff_requirements_mirror.txt
-cat diff_requirements_mirror.txt
-
-$pypimirrorvenv/bin/pip install -i http://pypi.python.org/simple -d $tmpdownload/pip/openstack 'pip==1.0' 'setuptools>=0.7' 'd2to1'
-
-$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
-
-find $pypidir -type f -name '*.html' -delete
-find $pypidir
-
-
-# Make pypi thing
-pypiurl=http://localhost/pypi
-export no_proxy=$no_proxy${no_proxy:+,}localhost
-
-cat <<EOF > ~/.pydistutils.cfg
-[easy_install]
-index_url = $pypiurl
-EOF
-
-cat <<EOF > ~/.pip/pip.conf
-[global]
-index-url = $pypiurl
-extra-index-url = $pypiurl/$distro
-extra-index-url = http://pypi.openstack.org/openstack
-log = $HOME/pip.log
-EOF
-
eptest=$tmpdir/eptest
mkdir $eptest
cd $eptest
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pbr-0.8.0/tox.ini new/pbr-0.10.0/tox.ini
--- old/pbr-0.8.0/tox.ini 2014-03-27 23:08:41.000000000 +0100
+++ new/pbr-0.10.0/tox.ini 2014-07-21 20:06:25.000000000 +0200
@@ -19,8 +19,7 @@
[testenv:pep8]
deps = -r{toxinidir}/requirements.txt
-r{toxinidir}/test-requirements.txt
- hacking
-commands = flake8
+commands = flake8 {posargs}
[testenv:cover]
setenv = VIRTUAL_ENV={envdir}
++++++ python-pbr-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