Commit Graph

411 Commits

Author SHA1 Message Date
Doug Hellmann 9082720fc4 Add user.name to git config in tests
Apparently git wants the user.name set as well as user.email, so add
that to the fixture class.

Closes-Bug: #1296200
Change-Id: I6ce2d7e3ca6f0e6cf2d8de962027e8f9b9dcc9b7
2014-09-17 17:14:44 -04:00
Robert Collins 7613992db7 Honour validly tagged versions.
There was a bug in the code to ignore bad tags - we stopped outputting
actual release versions altogether.

Change-Id: I0eb3fe6a09f0e696b96eab1e14549ea0a8fe27ba
Closes-Bug: #1370608
2014-09-18 07:56:06 +12:00
Julien Danjou 547f02194e autodoc: allow to exclude modules from auto-generation
Some projects need to not generate and publish documentation for some of
their modules. This patch adds an option to list modules that should be
excluded from documentation auto generation.

Change-Id: I944a6ad5faa113ca26eb32b78be1bfc41e1387ef
2014-09-17 16:21:54 +02:00
Julien Danjou 883c865908 tests: factorize has_opt handling
Change-Id: I7d5551af250c1e24177e0e7eed0bd622bb06ca29
2014-09-17 16:21:54 +02:00
melanie witt eb7238725e Support reading versions from wheels
This change adds the ability for pbr to read the package version from
the METADATA file as well as the PKG-INFO file. The PKG-INFO file
is present for sdist packages but for wheel packages (PEP 427),
there is a METADATA file instead of a PKG-INFO file.

Closes-Bug: #1369179
Change-Id: I2fe52c846fd88d37a4ab78de87eec9defce1ba0a
2014-09-16 22:40:22 +00:00
Robert Collins dc62764a24 Only consider tags that look like versions.
pbr has been allowing any tag (e.g. 'fred') to be a version - but fred
is clearly not a version! Since git describe cannot validate versions
for us today, we need to perform the describe calculations ourselves.

In order for this to work on Python3, a missing method __hash__ needed
to be added to SemanticVersion.

Change-Id: I09fa54231e77ae7671aa6f84eb91fd655e49ab25
Closes-Bug: #1356784
2014-09-15 14:35:20 +12:00
Robert Collins 8460101cc3 Refactor oneline changelog walking.
We want to suck the changelog into the description as well, but we
don't want all of it there. Making it a generator of formatted
objects lets us apply some logic without conflating things or tying
it up too much. This patch does prep work for the long term goal.

Change-Id: Idd00c219891500210c83faeb0f2d4370add3b069
2014-09-15 11:14:50 +12:00
David Stanek 90e7daeee8 Fixes a spelling error
Change-Id: If06fa34cc04fec0b5af4c4fcaa82ae7ceefe4c85
2014-09-10 06:07:40 +00:00
David Stanek 0d6bfaf2e3 Adds option for excluding files from autodoc trees
The arguments originally being passed into sphinx.apidoc specify '.'
as the path to index. Unfortunately this includes the setup.py module.
This causes Sphinx to complain or break depending on the configuration.

This patch ignores setup.py by default and allows the project to
override it in their setup.cfg.

Change-Id: I7c164d42a096ba1a0daf314a689cc3252ca81c49
Closes-Bug: #1260495
2014-09-10 02:14:23 +00:00
Joshua Harlow 7cb1dbfb8d Allow for inclusion of authors and changelog when building docs
When git is available and changelog and author building has not
been turned off try to build these two files so that they can be
included in any subsequent documentation.

Change-Id: I2fc7ade645e3ff1a67e30bd4d35676b5e10916af
2014-09-07 20:28:29 -07:00
Jenkins 4cecec5c78 Merge "Accept capitalized Sem-Ver headers" 2014-09-05 10:18:24 +00:00
Jenkins 40bcd34968 Merge "use get_boolean_option for warnerrors" 2014-09-03 22:20:54 +00:00
James E. Blair 449f0ab108 Accept capitalized Sem-Ver headers
In Git, HTTP, and SMTP, header names generally have the first letter of
each word (including each part of a hyphenated word) capitalized.  In
all of the same cases, the actual headers are generally not considered
case-sensitive.  Accomodate this convention and the robustness principle
by performing lower-case comparisons of header names, and using
upper-case names in all of the documentation.

Change-Id: Iffa68107c8ff2aeaac92434da85155213e45a3cd
2014-09-03 07:39:48 -07:00
Jenkins 3603c5453d Merge "Look for and process sem-ver pseudo headers in git" 2014-09-03 14:11:58 +00:00
Jenkins 886a95f8d0 Merge "Raise an error if preversion versions are too low" 2014-08-29 10:15:15 +00:00
Dirk Mueller 2a31f03dc3 use get_boolean_option for warnerrors
This way even warnerrors = 0 is handled properly.

Change-Id: I83d2eb105d07fd65ebc720c63038fc3c542b7f90
2014-08-28 12:28:15 +02:00
Robert Collins 85ba9600b2 Handle more legacy version numbers
We were not handling 1.2.1a1 or 2.1.0.rc1.

Change-Id: I087ff6f0449d528ee86b8e16721d12fd9b231846
Closes-Bug: #1361251
2014-08-26 23:39:15 +00:00
Robert Collins c1c99a7c31 Look for and process sem-ver pseudo headers in git
At the moment careful changelog review is needed by humans to
determine the next version number. Semantic versioning means that all
we need to know to get a reasonable default next version (and a lower
bound on the next version) is a record of bugfix/deprecation/feature
work and api-breaking commits. In this patch we start scanning for
such headers from the git history to remove this burden from
developers/project release managers. Higher versions can of course
be used either via pre-versioning or by tagging the desired version.

implements: blueprint pbr-semver
sem-ver: feature
Change-Id: Id5e8cd723d5186d1bd8c01599eae8933e6f7ea6d
2014-08-26 11:17:35 +12:00
Robert Collins c7e00a36de Raise an error if preversion versions are too low
Right now the only automatic version number we have is 'last release',
but thats enough for preversioning to be invalid. When we get API and
ABI break support, this will do more useful things like telling us the
next version is not sufficiently higher.

implements: blueprint pbr-semver
sem-ver: feature
Change-Id: I2583c7409d51364ef9d84b39356d5608a95cb6f8
2014-08-26 11:12:36 +12:00
Robert Collins 81c2000881 Teach pbr about post versioned dev versions.
Untagged versions should not be presented as final versions, which is
what was happening. The rules for dev versions are that they lead up
to the next release, so to emit a dev version we have to increment
the current version, then we can emit a dev version number.

implements: blueprint pbr-semver
sem-ver: feature
Change-Id: Icf2f1999613e0d26424798697de34811b9cfc4ab
2014-08-14 16:58:11 +12:00
Monty Taylor 1758998881 Handle more local dev version cases
Due to an oversight in testing (the tests for local dev versions were
all running with PBR_VERSION in the environment) we did not handle
enough variety of local development versions.

Specific new cases we now handle:
 - untagged trees - where git describe returns just the sha
 - tags with versions with less than two components (e.g. 1)

Change-Id: Ieaeca592b6ba26c5da50dcad3fb6e7551431d50e
Co-Authored-By: Robert Collins <rbtcollins@hp.com>
2014-08-14 16:58:03 +12:00
Robert Collins 5957364887 Introduce a SemanticVersion object
This object represents a single semver version and provides serialisation
into different forms (dpkg/rpm/pep-440).

implements: blueprint pbr-semver
sem-ver: feature
Change-Id: I482e07cce9b65df452d5b9af4c73960df68a141e
2014-08-13 12:16:38 +12:00
Christian Berendt b077c056e3 Bump hacking to 0.9.x series
Ignore H904 because it's a deprecated hacking check.
Ignore H405 because it should be fixed with a separate patch.

Change-Id: I2e3bf41474cead1a860810886791e025139cca3b
2014-07-22 14:22:57 +02:00
Monty Taylor ee94082d48 Remove all 2.7 filtering
ordereddict and importlib used to break when attempted to install
on python 2.7 - but this situation seems to have improved in
modern pip/setuptools. Remove the logic and support for this.

Change-Id: I49d9c9ee3108ad7ec9537f3fcec62e84d4de1680
2014-07-21 08:00:59 -07:00
Monty Taylor c2aab3b27f Stop filtering out argparse
Back in the day, attempting to install argparse on python 2.7 would
result in failure, as the setup.py of argparse failed hard if it was
attempted. That seems to be fixed, and when we do filter it out of
the list now, we cause problems with python 2.6 and wheels (if we make
a wheel on 2.6 and it depends on argparse, the pbr code means that
argparse doesn't get added properly)

Remove the filtering so that our wheels can be universal.

Closes-bug: #1346357
Change-Id: I49d539ac6fb8ee75f8d32fdfbd20129b13d36499
2014-07-21 08:00:27 -07:00
Jenkins e1b98f578a Merge "Check for git before querying it for a version" 2014-06-30 17:34:07 +00:00
Robert Collins fa17f42d7d Allow examining parsing exceptions.
Having to put breakpoints in pbr to diagnose issues is bad for dealing
with reports from users.

Change-Id: Ifecf4c4e4bb5955e0e5feb4bf5b5b85150b08ebe
2014-06-28 19:40:15 +12:00
Jenkins d815366577 Merge "Un-nest some sections of code" 2014-06-27 02:29:12 +00:00
Kevin McCarthy b07a50bfdd Restore Monkeypatched Distribution Instance
pbr is monkeypatching the Distribution intstance in setuptools, which is
OK I guess, but then it never puts it back how it left it.  As a
consequence, whenever pbr installs before another project in a setup.py,
it breaks setuptools for everything that comes after it.  This patch
will restore the Distribution instance.

Closes-Bug: 1324784

Change-Id: I20fbf255c634685e82f7b11987d2725de8280b9d
2014-06-22 15:32:29 -10:00
Steve Kowalik 715c59738e Register testr as a distutil entry point
pbr contains a testr distutil command, but since it isn't registered
as an entry-point, it won't get used. Also drive-by a fix to
coverage, where we go to the trouble of setting a variable, and then
not using it.

Change-Id: I2227adf3643ffe6bcece0c7d2127d23e20d52f7a
2014-06-11 16:31:15 +10:00
Jeremy Stanley 654191113e Check for git before querying it for a version
* pbr/packaging.py(_get_version_from_git): Wrap calls to
_run_git_command in a conditional check for _git_is_installed to
avoid an opaque error message which can occur when you have a .git
directory but no git executable.

Change-Id: I6752c93d393a941daa1e7fb949c7c3d2a75337f3
Closes-Bug: #1326682
2014-06-05 23:07:44 +00:00
Jenkins a38dc208cf Merge "Allow _run_cmd to run commands in any directory." 2014-05-30 02:21:54 +00:00
Robert Collins 6f4ff3c05a Allow _run_cmd to run commands in any directory.
This is needed to avoid running pip install within the directory of
the test package on Python2.6, where it helpfully (not really)
installs the test package, not pbr.

Change-Id: I956ad29f68a32cb4d33af448333f649043e0a655
2014-05-29 08:56:32 +12:00
Jenkins 8a4017eb5e Merge "Make setUp fail if sdist fails." 2014-05-27 12:03:24 +00:00
Robert Collins 2e2245c783 Make setUp fail if sdist fails.
Hygiene - fail at the point of failure, not later.

Change-Id: Id0328f1afad5dd2fb4f5ef22e025d60eef1d4e52
2014-05-27 10:40:10 +12:00
Monty Taylor bdb01910cb Un-nest some sections of code
Reversing the logic in a few of the booleans and returning earlier
allows us to not have to be nested quite so deep.

Change-Id: Ia0dad183563381e9eb8c790ba61d0b350d74421d
2014-05-26 11:32:12 -07:00
Monty Taylor 3250f69d1a Remove --use-mailmap as it's not needed
--use-mailmap is a newer git construct that applies mailmaps to
things that are not using the mailmap aware format strings. But
we're using those format strings, and this breaks on precise.

Simplest thing - don't use the arg, since it's pointless and broken
for us.

Change-Id: Ic8ca062a6936a4f112aa52d0eb209211658611c2
2014-05-23 13:39:05 -04:00
Marc Abramowitz 54d1191a87 pbr/testr_command.py: Add logging
to aid in debugging and testing.

Change-Id: I5342604204602623cdb5c0f2623d85f7d44e2b50
2014-05-05 22:15:45 -07:00
Jenkins e43dc7de4b Merge "Make source configurable when using --coverage" 2014-04-30 14:41:39 +00:00
Marc Abramowitz d68a321265 Make source configurable when using --coverage
Change-Id: If5cd9e517d66322027408a59fd99015c91181db8
Closes-bug: #1310008
2014-04-25 20:21:47 -07:00
Ruby Loo e67ff52d84 Format autoindex.rst file properly
Fix the indentation of the lines following the "toctree" directive
in the autoindex.rst file, so that they are aligned under the
start of the "toctree" directive.

Change-Id: Iff4ec8ea05819f6126a7be3d1fb5238c969fca21
Closes-Bug: #1307769
2014-04-15 02:06:51 +00:00
Jenkins 02aeac0b14 Merge "Add support for nested requirements files" 2014-03-31 01:56:19 +00:00
Jenkins 35b34b77bf Merge "Remove duplicate git setup in tests." 2014-03-31 01:45:26 +00:00
Toilal 95c86cbed7 Use unicode_literals import instead of u'unicode' notation.
Change-Id: I94ff7e2517c714b9f576f9f9f615537502fcbf41
Closes-Bug: #1276139
2014-03-27 08:22:20 +01:00
Ben Nemec 960385efd5 Add support for nested requirements files
pip supports requirements files with a line such as:

-r other-requirements.txt

for specifying nested requirements files.  Adding support to pbr
should be helpful with handling optional dependencies in projects
better, by allowing us to split the requirements files and then
merge them back together using -r lines.

Change-Id: I80e081b2229cc81eed26533c50afb07dc98a1db1
2014-03-26 17:56:50 +00:00
Octavian Ciuhandu af4c193250 Fixes blocking issue on Windows
On Windows, environment variables can not be unicode.

Change-Id: I8c7fd7627d7f733e0db8690a39e7128b7fe2ebcf
Closes-bug: #1294246
2014-03-19 01:52:57 +02:00
Robert Collins 542cd8057e Remove duplicate git setup in tests.
Less duplication for more reuse. If the intent was clarity before, I'm
happy to skip this and just have duplicate code...

Change-Id: I09fd14ecd9751e79a3a475dedf320c36ba0ba71c
2014-03-17 09:16:24 +13:00
Robert Collins 6ffff7c957 Factor run_cmd out of the base class.
I want to reuse this for factoring out some fixtures, so make it
reusable.

Change-Id: I7035a514adf889a8ebaadff9ae873341804fe099
2014-03-13 18:02:45 +13:00
Robert Collins 9fdd06fcbb Return the real class in VersionInfo __repr__.
Change-Id: I52337fd704a0d4b38f9562d88dcdf5952cf7b422
2014-03-13 15:00:33 +13:00
Robert Collins 406667beee Fix up some docstrings.
The version.py docstrings were a) not PEP compliant and b) somewhat
out of sync with the code.

Change-Id: I87c4134ef80fd9e6fd57b66c58c3c5920ee0b6b6
2014-03-13 15:00:33 +13:00
Clark Boylan 68e88965b6 Init sphinx config values before accessing them.
Sphinx's config object needs to have its values initialized with
init_values for the values to be loaded from _raw_config into config.
Without this pbr gets null equivalent values from Sphinx's config. These
null values prevented man pages from being built when Sphinx warnerrors
is set. Fix this.

Change-Id: I0f17ca6eff036a0bcc6686fcc3f4efe0830cc585
2014-03-06 16:11:13 -08:00
ChangBo Guo(gcb) fe08ee5d79 Remove copyright from empty files
According to policy change in HACKING:
http://docs.openstack.org/developer/hacking/#openstack-licensing
empty files should no longer contain copyright notices.

Closes-Bug: #1262424
Change-Id: Ib937beb9f627e7b5e25baa1cd37fd01fcc04fd41
2014-03-03 08:46:50 +00:00
Jenkins ef796d4fc9 Merge "Remove unused _parse_mailmap()" 2014-02-25 17:17:09 +00:00
Mark McLoughlin 9375a76810 Remove unused _parse_mailmap()
Unused since commit 745d615

Change-Id: I7fbd90bb480f6d039e2e96d629a1db67127f40d5
2014-02-18 07:14:00 +00:00
Toilal b1f29780de Add support for python 3-<3.3
Use unicode_literals import instead of u'unicode' notation.

Change-Id: I6e6aba938ae43399d5aa398344c219fe43649034
Closes-Bug: #1276139
2014-02-17 07:50:27 +01:00
Doug Hellmann 3eb741afcd Do not force log verbosity level to info
Forcing the log level to info causes pbr to emit status log messages
in a way that breaks commands like "python setup.py --maintainer" and
"python setup.py --name", which are useful when scripting operations
that work on packages.

Change-Id: I6607c96e171f2f8efa89bd701018f4af6ec9c15a
2014-02-05 12:28:01 -08:00
Julien Danjou 44803433a7 package: read a specific Python version requirement file
This change makes pbr reads a specific requirement file tight to the
major Python version that is used. So you can add a file such as
requirements-py3.txt to have a specific requirement file for Python 3,
or requirements-py2.txt to have a specific requirement file for
Python 2.

Change-Id: I4b548e9830586f11b82539d334dd5cf4b0445a36
2014-01-28 12:30:14 +01:00
Monty Taylor e7878f2171 Use wheels for installation
Add an option to pbr to use wheels when installing things from pip. The
speed boost this gives is quite sexy, as it can avoid having to
re-build C things all the time.

Change-Id: Id9b9b21ef949ff44c7c962e81576266661264a13
2013-12-04 02:19:29 +00:00
Jenkins fc9ea60837 Merge "Let git do mailmap mapping for us" 2013-11-30 10:31:43 +00:00
Jenkins e859591e97 Merge "Make ChangeLog more condensed" 2013-11-30 10:31:40 +00:00
Jenkins de8d542f03 Merge "Make sphinx builders configurable in LocalBuildDoc" 2013-11-29 06:24:44 +00:00
Monty Taylor 745d615c67 Let git do mailmap mapping for us
It turns out, git log already knows how to process mailmap files.
Just defer to it and stop processing that in python.

Change-Id: Ib3d6f85683fcbe8b5002117d2ee46dc3c008cae7
2013-11-29 05:11:53 +00:00
Monty Taylor 94a6bb92f3 Make ChangeLog more condensed
Just duplicating the git log isn't particularly exciting. Make
the ChangeLog a list of change subjects grouped by tag.

New output can be seen here: http://paste.openstack.org/show/49999

Change-Id: I7bf4d89dcdba135de663d75895b30963f7a44662
2013-11-29 05:11:10 +00:00
cbjchen@cn.ibm.com 62d9684b3f Make sphinx builders configurable in LocalBuildDoc
Sphinx builders were hard coded to be html and man in LocalBuildDoc
before. This enables users to config a list of builders in setup.cfg
as a comma seperated list, e.g. html,man,doctest

Change-Id: I3528b208c7e719286fe8816acf65f8efdc5844c6
2013-11-27 23:23:07 +08:00
Jenkins 1c6da2eecd Merge "Communicate to user when we skip a requirement" 2013-11-26 13:04:12 +00:00
Jenkins ad2324b8a8 Merge "Base python 2.7 skip list on parsed names" 2013-11-22 09:55:03 +00:00
Sergey Lukjanov 6f8f0854ab Ignore jenkins@openstack.org in authors building
this email used for posting requirements updates

Change-Id: I30e2e68cb6b5e8c2bcbc972a632ac2a1254f5fe4
2013-11-14 19:48:00 +04:00
Monty Taylor 007156c347 Communicate to user when we skip a requirement
We skip several requirements on python >= 2.6 because they
are only needed on 2.6 but there is no good way to express that in
requirements.txt. This can be confusing to users, because they may
not be expecting such a thing and may think something broke.

Print a message to the info log to that the user can see that we
chose to not install their non-needed requirement.

Change-Id: I11de12351123bbf406f77cf402feeab0e5dff26b
2013-11-14 06:22:30 -05:00
Monty Taylor efe5028569 Base python 2.7 skip list on parsed names
We keep a list of libraries that should only be installed on python 2.6,
but the check to see if a requirement matches that list was only doing
a simple string equality, which would miss attempts to install version
specified instances of one of them.

Instead, use pkg_resources to parse the potential requirements line and
operate on the parsed project name.

Change-Id: If64e4b2ee6696a0531e3ed6099e63372d47bc851
2013-11-14 06:13:22 -05:00
Davanum Srinivas 5e248c5b2d Avoid using 'which' executable for finding git
Just use 'git --version' to check if the git executable is present

Change-Id: Ib5c11060fa7d9b7d9741dd88fc3430237f0bc1a0
Closes-Bug: #1248447
2013-11-07 22:17:37 +08:00
Nikhil Manchanda 629bbce1c8 Fixed pbr install to not error out and fail if git is not installed
Fixed the issue where pbr was erroring out (file not found) when
running 'python setup.py egg_info' since it was trying to get the
.git directory even if git was not installed.

Closes bug 1245676

Change-Id: I31e1f86f10f18897774b49eb293aede31641db31
2013-10-30 03:12:34 -07:00
Jenkins e8a3c7e7ba Merge "Move base test case logic out of __init__.py" 2013-10-28 01:13:31 +00:00
Jenkins a3a875b1a0 Merge "Prevent ordereddict installation on 2.7" 2013-10-27 22:58:13 +00:00
Monty Taylor 1f730e2580 Move base test case logic out of __init__.py
It's an antipattern to have functional code in an __init__.py. Move it
into base.py to be less anti.

Change-Id: Ib4db548b78e4e760d94099596a3c495a839836dc
2013-10-28 09:04:28 +13:00
Monty Taylor 3fdedcf69e Comply with pep440
pep440 indicates that development releases should mark themselves with
the devN specifier.

  http://www.python.org/dev/peps/pep-0440/#developmental-releases

Instead of using aN as we are currently doing for automatically
generated versions, we should use the pep440 compliant devN form.

Change-Id: Ieeb5149f8b013e76621112593e0a5c0a64817e1f
2013-10-18 17:08:28 -04:00
Thomas Leaman a7e5f91d90 Prevent ordereddict installation on 2.7
This supports https://review.openstack.org/#/c/48475/ in glance
to remove copy/pasted ordereddict code.

Change-Id: I9b0a2588c6e7da86c048698c5e6dfe37ced4dd7f
2013-10-16 16:07:25 +00:00
Doug Hellmann ae25b565d3 Do not pass unicode where byte strings are wanted
Some versions of the tarfile module break when unicode data is
passed as metadata (like the version). See
http://bugs.python.org/issue11638 for details.

This change ensures that version number is always a byte strings
under python 2, where the problem exists.

Change-Id: Ic266cd7cce0394d28794ee61afe269f1296be2a2
2013-10-09 17:49:18 -04:00
Jenkins 3391ca5c1a Merge "Rework run_shell_command" 2013-10-09 16:00:52 +00:00
Robert Collins 0ff4fe1a76 Add a test for command registration.
This would be better as a direct unit test, but I can't see where
thats done; and setuptools doesn't seem super friendly to that.

There are more commands that can be tested, but this seemed like a
good place to start.

Change-Id: I433880d9b08d07de0194450bbc90a423554e347c
2013-09-30 16:53:39 +13:00
Robert Collins 2f74b467dd Switch away from tearDown for BaseTests.
tearDown is never the right hammer.

Change-Id: If17ae653e25d4fba2b768cb569a573467448ccef
2013-09-29 21:44:47 +13:00
Robert Collins 55f76425fa Fix test_changelog when git isn't globally setup.
This test was assuming that it was possible to make a new git repo and
commit to it, but some versions of git will error if no user email is
set, and some users choose not to have that set globally.

Change-Id: I94401c4fe716021c2cb2f1585690463746c740c9
2013-09-29 20:53:13 +13:00
Monty Taylor d322c34fec Rework run_shell_command
A previous patch for windows support made the simple case of passing a
string to run_shell_command complicated with quoting. Clean that up by
reverting to list, which avoids the crazy quoting we had to do.

Change-Id: Ia3b8ac6a57e7400d0aab0d5265c851e536fb4e87
2013-09-28 14:15:59 -04:00
Jenkins 2f0b291bb9 Merge "Add a hint for users who don't have git installed." 2013-09-07 04:31:32 +00:00
Ryan Petrello 9786042aeb Add a hint for users who don't have git installed.
Change-Id: I31058752e8303beab3f21dd590459e9a8a7c2334
2013-09-06 18:18:37 -04:00
Jenkins 24ee68c226 Merge "Fixes issue with command escaping on Windows" 2013-08-14 21:54:08 +00:00
alexpilotti 091b774f0c Fixes issue with command escaping on Windows
Fixes bug: #1210912

Special characters like <, > or ' need to be escaped on Windows when used
with "cmd /C <command>" as implemented in _run_shell_command

In order to avoid escaping issues, shell spawning has been replaced with
direct command execution. As a consequence, grep/egrep command pipes have
been replaced with Python regular expressions where appropriate.

Change-Id: Idd50fd24f300bce655f99d42cb96e37d29d4cb14
2013-08-13 03:16:57 +03:00
Jenkins e2821d16e7 Merge "Add option to run testr serially" 2013-08-11 16:54:33 +00:00
Monty Taylor fb0aabc97d Fix pep8 error
I have no idea how this wasn't happening before but now is.

Change-Id: I3a9c82d58d9a89d31711efbdd30324888f343e3a
2013-08-08 11:20:41 -03:00
Matthew Treinish 91caceed9c Add option to run testr serially
This commit adds a new serial option to testr_command.py that when
set will run testr serially instead of running testr with the
'--parallel' flag.

Change-Id: Id49b105dc921e9acdef1a94d933719ad3a772c81
2013-08-06 15:50:43 -04:00
Monty Taylor d26d43014b Replace setuptools_git with a smarter approach
Implement a local egg_info command that only re-generates the
SOURCES.txt file when we need to. That is:

 - If there is no SOURCES.txt, make one
 - If we have run the sdist command, make one

Otherwise, leave well enough alone.

Also, skip doing any git processing if SKIP_GIT_SDIST is specified.

This should mean that consumers of our tarballs should not get screwed
by the need to inject git processing into the sdist.

Change-Id: I163b1c153d030e79b120600a2890edeb49e1fa90
2013-08-04 11:30:32 -04:00
Jenkins 344187c8a7 Merge "Improve AUTHORS file generation" 2013-08-04 15:17:24 +00:00
Jenkins 9004973d42 Merge "Ensure _run_shell_command always returns same type" 2013-08-04 01:30:49 +00:00
Monty Taylor b6234379aa Correct typo
The filter for not double running ourself was mis-spelled.

Change-Id: Ief500bb4426f74cf5d41440a80056ae4122f6fcb
2013-08-03 16:46:46 -04:00
Sergey Lukjanov 44ba87493d Improve AUTHORS file generation
* remove authors/co-authors duplicates
* sort all authors/co-authors
* add a new line to the end of file

Change-Id: I48a388e8ae2defd05ad617d5de709d0e623a5c36
2013-08-03 12:41:54 -04:00
Doug Hellmann 8eff471f60 Ensure _run_shell_command always returns same type
If _run_shell_command gets no output, return an empty
string instead of None. This ensures that callers can
always treat the results as a string, and avoids the
TypeError that was preventing the ChangeLog and AUTHORS
files from being created properly in a git repository
without any commits.

Change-Id: I880210bc3ff92ece29b216a10e1d0c918f884eaf
2013-08-02 13:11:41 -04:00
Jenkins 9a3b733887 Merge "Use the same logic everywhere for requirements files" 2013-08-02 02:24:59 +00:00
Jenkins 21fe44e769 Merge "Hierarchical sphinx API documentation generation" 2013-08-01 19:24:39 +00:00
Jenkins 3b82b9b9d0 Merge "Add skip_pip_install to setup.cfg" 2013-08-01 00:31:18 +00:00
Attila Fazekas 44f6adef98 Hierarchical sphinx API documentation generation
* Adding a new pbr boolean option 'autodoc_tree_index_modules' for
  creating a package/module hierarchy oriented API documentation.
* Using the sphinx.apidoc module in order to
  generate the *.rst files and the modules.rst.
  The sphinx.apidoc.main function call expected to be more future proof,
    than the other options.

Change-Id: I145086387edf6b042368d4c16dd64948f67606b0
2013-07-31 09:06:28 +02:00
Jenkins 600aa2a250 Merge "Add support for classmethod console scripts" 2013-07-31 04:01:36 +00:00
Jenkins 3d40ea10f8 Merge "Fix .mailmap file search location" 2013-07-31 03:00:35 +00:00
Maru Newby 845a46c7c4 Add support for classmethod console scripts
* Previously console_scripts could only reference functions:

     script_name = package.name:function_name

   This change adds support for classmethods:

     script_name = package.name:ClassName.classmethod_name

   This change is necessary to support a Neutron use-case.

 * Fixes bug 1206734

Change-Id: I9509d3f2cea29fee5696936dbbb1d507764f1e81
2013-07-31 02:52:30 +00:00
Monty Taylor 68462dd62b Add skip_pip_install to setup.cfg
The envvar SKIP_PIP_INSTALL isn't enough in all cases. Add the ability
to configure this in the config file.

Change-Id: Ic84bd6df52d2b96bf4afcaacd9c8b6fee26e9840
2013-07-30 15:01:51 -04:00
Monty Taylor bb8bdf0e76 Remove missing_reuqires optimization
The attempt to optimize away some shell calls to pip wound up having
python setup.py install not do the right thing with missing transitive
depends. Remove the optimization check.

Change-Id: I0db9cc18fda98b8f53b61422e730fd76e0c6a0c1
2013-07-30 12:55:32 -04:00
Julien Danjou 6545e2b6d3 Use the same logic everywhere for requirements files
Currently, the environment variable isn't always respected, especially when
dealing with the egg_info command. Let's factorize the code into a function
and use it everywhere instead of the REQUIREMENTS_FILES variable.

Change-Id: I1c3224ef76ee724c8176eb00ef948d80259e3c17
2013-07-30 10:19:59 +02:00
Jenkins 1273cbdd7c Merge "Loop over test output for better readability" 2013-07-27 14:57:06 +00:00
Jenkins 54ca83a2e8 Merge "Add support for globbing in data files" 2013-07-27 14:57:05 +00:00
Jenkins a8cffe5bf5 Merge "Revert include_package_data change" 2013-07-27 14:57:04 +00:00
Jenkins 9e3af631e0 Merge "Also patch easy_install script creation" 2013-07-27 14:42:36 +00:00
Sergey Lukjanov 80bf39aa79 Fix .mailmap file search location
It should be in the root project dir, not in the .git dir.

Fixes: bug #1202375

Change-Id: I5d7cd61f3ec9323afed371c7082f2694a7e8347c
2013-07-27 11:00:26 +04:00
Monty Taylor 37f5b545ae Swap the order of configparser imports
The configparser backport package has un-understood issues parsing
our files. But the intent of the code is to use whichever is the
package for the version of python in use. So, instead of trying to
install the python3 version first, which can also result in loading
the backport package, first try the python2 package, so that if
configparser itself is loaded, it will be because we're running python3.

Change-Id: I7ef497127822d0110804b04a674f24c195a07278
2013-07-25 10:09:17 -07:00
Monty Taylor 761b27fee6 Add support for globbing in data files
Similar to the work in the packages argument, allow the specification
of a directory to recursively include as part of the install.

Change-Id: Ife0414af468e7fcd4fc419eafc3e19e29efcfc7b
2013-07-24 15:45:53 -07:00
Monty Taylor 5b2116aad0 Revert include_package_data change
Setting the value directly in kwargs is not doing what we want it to do.
This is largely because of how the hook system works. When the hooks
process backwards_compat, they do a config.get('backwards_compat',
dict()), which is then written back to the config dict - which means
that blank override values are being fed in.

Later we can go through and just re-engineer how that works. For now,
unbreak nova.

Change-Id: I0c6055253cbc89b6884553e6f2fbfe8a7bbd1953
2013-07-23 16:16:24 -07:00
Monty Taylor 8a43c13bdc Also patch easy_install script creation
During python setup.py develop, easy_install is called via a different
code path to install the scripts. We need to inject into that place as
well.

Change-Id: Iab319f3771529c6d57f6a36ec717fb3278839f78
2013-07-23 15:59:34 -07:00
Monty Taylor f7aed20d31 Loop over test output for better readability
The way _run_cmd was working meant that in a test failures, the captured
output was a giant blob of text with \n strings inside it, making it
unreadable. By looping and printing, it becomes readable again.

Change-Id: I2db3057c34e2a50f7a420f2dbcf45c6ec874b632
2013-07-23 09:53:53 -07:00
Jenkins 0243b7ae33 Merge "Ignore project creator while generating AUTHORS" 2013-07-22 03:56:59 +00:00
Jenkins 89961a70a7 Merge "Replace entry_points console_scripts" 2013-07-22 03:48:06 +00:00
Jenkins db43d24cd5 Merge "Remove the need to specify the pbr hook" 2013-07-22 03:47:42 +00:00
Jenkins 21390906ea Merge "Move d2to1 more into the source tree" 2013-07-22 03:46:19 +00:00
Jenkins 06828ebbe3 Merge "Set defaults directly in option processing" 2013-07-21 21:22:42 +00:00
Monty Taylor 8e58c2fa58 Replace entry_points console_scripts
The console scripts generated by entry_points are too complex for
our needs and make things run slowly in service of a multi-version
install that we don't use.

Instead, install a simple script which just does a direct import.

Change-Id: I1ec46837cea07db514f2fb6338c7bced34a83c4a
2013-07-21 12:43:58 -07:00
Doug Hellmann aa7a6fd327 Fix integer_types type under python 3
Set the integer_types variable to the same kind of object
under python 3 and 2 so that when we go to manipulate it
later it works.

Change-Id: I8f9db1d76931ef834645095952f71415d98f0b5c
2013-07-21 15:28:06 -04:00
Monty Taylor c84876dc0f Remove the need to specify the pbr hook
If you're running pbr codepaths, you want the hook. There is no need
to say "pbr=True" in setup.py and then to list the hook in setup.cfg
now that d2to1 is in the tree.

Change-Id: Ie33d3e08d5a4133f5caf2613859919ce4f02c4a0
2013-07-21 11:41:34 -07:00
Monty Taylor 71bea435b6 Move d2to1 more into the source tree
When we merged in d2to1, we kept it separate, but I don't think there
is a great benefit to doing that.

Change-Id: I3972b3132619e8e2dd7e362ca5fe9d1e3add43b8
2013-07-21 10:20:03 -07:00
Monty Taylor d09372e59e Set defaults directly in option processing
Change-Id: Iaa327862fc9e43aade2dd1ed66aa27f335f12ac7
2013-07-21 09:59:27 -07:00
Sergey Lukjanov 29afae0bf2 Ignore project creator while generating AUTHORS
New projects created by OpenStack Project Creator
<openstack-infra@lists.openstack.org>, so it'll be better to remove it
from the AUTHORS file.

Change-Id: I32975bd430635a38c7e737e70f381f7b07c6ed0c
2013-07-18 09:47:52 +04:00
Monty Taylor a61eae656b Fix some issues in setup.py test
While tracking down a troveclient issue, found several issues in
the new python setup.py test command:

* check the right source files when we're trying to decide whether to
re-run egg_info
* fix bogus dependency links args when installing test requires
* fix bogus .egg_info dir name when a project name includes a hyphen

Change-Id: I0a1964902a87f72eb67f43b10f90dfee8c7d7875
2013-07-12 02:05:10 -04:00
Jenkins 8809f52368 Merge "Put AUTHORS.in at the top of AUTHORS." into feature/merged2to1 2013-07-12 04:46:12 +00:00
Jenkins 313866f845 Merge "Support version override with PBR prefix." into feature/merged2to1 2013-07-12 04:45:44 +00:00
Monty Taylor 04b4933575 Put AUTHORS.in at the top of AUTHORS.
swift has an AUTHORS file that puts a header at the top of the
file with some extra information, then lists the contributors.
If we put AUTHORS.in at the top of the generated file, then we
can put their boilerplate into AUTHORS.in and the resulting file
should look the same.

Change-Id: I2caa4e606dd1199f49c925dccc64d492848ac580
2013-07-11 22:41:12 -04:00
Monty Taylor 137bdc5bdf Support version override with PBR prefix.
For non-OpenStack consumption of PBR, OSLO_PACKAGING_ is a weird
version override env var.

Change-Id: I8e80bcc5bc56e7950ed5cf0d24657957570134cf
2013-07-11 22:39:46 -04:00
Monty Taylor fb3ff01ecd Allow pip installation to be skipped.
Distro packagers don't really need for us to attempt to pip install
things for them. They're usually managing that dependency tree
in the distro packaging. Add an env var they can set in their spec
or rules files to skip any pretense of doing anything with install
requirements.

Change-Id: Ia6387eab3267fa3c4019c4a9d90e4780319c2397
2013-07-11 16:42:27 -04:00
Monty Taylor d88c6f803a Don't run pip needlessly
We can detect if the env we are a part of has our requirements met
already. If this is the case, don't re-run pip at all, so that we
don't waste time.

Change-Id: If49cd7bd558f98d8e6f51b0fe0192978bee9c77e
2013-07-11 16:42:18 -04:00
Monty Taylor 746b78d637 Clean up hacking and path issues with d2to1
We imported in another code base. It takes a little bit of path
adjusting to get things right.

Change-Id: Ifb96652c822d5d243a6bedb77bc34e919be2d3a8
2013-07-11 15:02:12 -04:00
Monty Taylor 295dbe1da3 Merge d2to1 into the tree, complete with history. 2013-07-06 14:16:17 -04:00
Monty Taylor 712f639977 Add support for namespace packages.
Without this, packages with namespace packages do not properly
create .egg-info/namespace_packages.txt
2013-07-06 14:15:17 -04:00
Julien Danjou ce11c732ac testr: fix Python 3 compatibility
Change-Id: Id6d15638277433f202857d2541e727b2b534c99c
Signed-off-by: Julien Danjou <julien@danjou.info>
2013-07-05 14:40:35 +02:00
Julien Danjou c996027aa2 Allow to override requirement files via environ
Change-Id: Ibcef09d97129644c09d761b46380b339eda2e942
2013-07-04 22:55:54 -04:00
Monty Taylor c5fa8f46bc Add importlib to the filter list.
Change-Id: I8025f5592b53acac7e70b590b2c61c95b1757474
2013-06-24 19:06:35 -04:00
Julien Danjou 5da640cca0 Fix integration script
Don't fail on inability to write new ChangeLog or AUTHORS files.
Ignore comments in requirements files

Change-Id: I0c017b493ca1ef3f1c770daf25d8778bd98f02ef
Fixes: bug #1192889
2013-06-24 19:06:30 -04:00
Jenkins 17ac6ab00d Merge "Make python setup.py test do the right thing." 2013-06-18 15:26:06 +00:00
Monty Taylor 04316feeb9 Make python setup.py test do the right thing.
As a step towards a common interface to running tests even when we're
not in the virtualenv - make python setup.py test actually be useful.

Change-Id: I8e4bc9bb78be37b4d13f8d6c2edfe2d67554ad78
2013-06-17 19:14:36 -04:00
Monty Taylor 182feb3061 Fix pip invocation for old versions of pip.
Fixes bug 1190749.

Change-Id: I91fce8ee1c37f945062e81c1585ee45613e05371
2013-06-13 17:34:47 -07:00
Jenkins 6c91a6f0f0 Merge "Use pip instead of easy_install for installation." 2013-06-11 13:40:50 +00:00
Monty Taylor d1c53ddad7 Use pip instead of easy_install for installation.
If we're running the installation of dependencies for installation
ourselves anyway - just use pip and be done with it. This means
that our requirements will get installed consistently regardless of
whether we're using pip, python setup.py install or a tox environment.

Change-Id: If92557a33a76553ad36bd136fa87780857a894b1
2013-06-10 21:31:47 -07:00
Jenkins a793ea1632 Merge "Skip git-checkout related tests when .git is missing" 2013-06-10 22:34:16 +00:00
Dirk Mueller 6c27ce7c8a Skip git-checkout related tests when .git is missing
When running tests from the released tarballs, the
AUTHORs related checks are failing due to missing .git
directory and the fallout caused by it.

Change-Id: Ic960863621f1b239ced299f892466537431d44d5
2013-06-10 14:20:18 +02:00
Monty Taylor 04984a51b1 Refactor hooks file.
It was long and rambly. It's also in need of unittesting. So split
it into some classes so that we can test the inputs and outputs
more sensibly.

Change-Id: I3d28f5771e38b819f98a9af06aeb06529be7b302
2013-06-07 21:47:38 -04:00
Jenkins c1c3aa1043 Merge "Explicitly install install_requires." 2013-06-05 20:33:19 +00:00
Jenkins 850cdd106f Merge "More python3 compatibility." 2013-06-05 14:10:22 +00:00
Monty Taylor 20c1071eed Explicitly install install_requires.
PBR uses distutils.install instead of setuptools.install to provide
non-egg based installs. This is effectively the same behavior as the
--single-version-externally-managed flag to setuptools, which is what
distro packagers use inside of debs and rpms. We do this so that we
can do things like install manpages and config files.

Unfortunately, this has the unintended consequence of completely
skipping dependency processing.

Add the logic from distribute into our install class to ensure that
the contents of install_requires are installed appropriately.

In the future, we'll want to replace this method with one that uses
pip instead of easy_install. Since we're doing the work now in our
code, we might as well do it well.

Change-Id: Id5465766f762ab37f121ee3d72a82098654e30db
2013-06-05 08:41:37 -04:00
Jenkins eb3ebd540c Merge "python3: Use six everywhere" 2013-06-04 14:34:48 +00:00
Jenkins c65554f24b Merge "Handle versioned egg fragments in dependency URLs" 2013-06-04 00:36:38 +00:00
Clark Boylan b18913e577 More python3 compatibility.
* pbr/packaging.py: Properly convert bytes into unicode strings and back
to bytes again. Replace os.path.walk() with os.walk().

* pbr/tests/__init__.py: Remove use of mox.

* pbr/tests/moxstubout.py: Remove use of mox.

* pbr/tests/test_setup.py: Use bytestrings instead of str or unicode
when performing IO.

* pbr/tests/test_version.py: Remove use of oslo.config.

* requirements.txt: Pin jinja2 to version compatible with python3.2.

* test-requirements.txt: Remove oslo.config and mox.

Change-Id: I9b5a32d7204fa2af56ecf4fdcf6b6da3bbb03200
2013-06-03 15:39:05 -07:00
Chuck Short e7b90361b9 python3: Use six everywhere
Use six to improve compatibility between python2 and python3.

Change-Id: Idc0b251d05f418a28a914d910dabd4a2d9ebdf2a
Signed-off-by: Chuck Short <chuck.short@canonical.com>
2013-06-02 12:18:45 -05:00
Devananda van der Veen 0846ee6313 Fix sphinx autodoc module headers.
Change-Id: I769eacf33053926e326e3d612b688cd8929f31ce
2013-05-29 15:38:19 -07:00
Mark McLoughlin 2dc50ea1e4 Handle versioned egg fragments in dependency URLs
If you include a dependency URL in your requirements file that has an
egg fragment e.g.

  http://tarballs.openstack.org/oslo.config/oslo.config-1.2.0a2.tar.gz#egg=oslo.config

we include the full URL in dependency_links (as you'd expect), but also
include the egg fragment in our requires.

With oslo.config, we're seeing a situation where 1.1.1 is installed and,
while pip knows that 1.2.0a2 is available (via dependency_links),
because our requires only say 'oslo.config' and we haven't passed
--upgrade, then pip sees the requirement as satisfied and doesn't
install 1.2.0a2.

What we really want to express is "we require at least 1.2.0a2 and
here's where you can find it" so, for example, we'll be happy if a newer
version is installed or available from pypi but, if not, then we'll
install from the supplied URL.

Now, egg fragments can be versioned e.g.

  http://tarballs.openstack.org/oslo.config/oslo.config-1.2.0a2.tar.gz#egg=oslo.config-1.2.0a2

but we need to transform the fragment so our requires becomes:

  oslo.config>=1.2.0a2

We should be fine for a backwards compatibility perspective, because
an egg fragment which included a hyphen just wouldn't have worked.

Change-Id: I6ec1b935d08ed5db993a3e47f591104528582101
2013-05-29 21:55:55 +01:00
Monty Taylor f675e5fb4a Fix author and changelog skipping.
Same problem as the other one.

Change-Id: I6d63b6d969756bca6b7df9ef9ee78e12ca1b052e
Reviewed-on: https://review.openstack.org/30538
Reviewed-by: James E. Blair <corvus@inaugust.com>
Approved: Clark Boylan <clark.boylan@gmail.com>
Reviewed-by: Clark Boylan <clark.boylan@gmail.com>
Tested-by: Jenkins
2013-05-28 17:07:48 +00:00
Monty Taylor 304196c101 Fix doc autoindexing.
The config section get returns a tuple, not a string, so we were trying
to lower() a tuple. That clearly does not work.

Change-Id: I96602a25686d447bd3437807d9e55aaec6bb9540
Reviewed-on: https://review.openstack.org/30520
Reviewed-by: Chris Krelle <nobodycam@gmail.com>
Reviewed-by: Devananda van der Veen <devananda.vdv@gmail.com>
Reviewed-by: Clark Boylan <clark.boylan@gmail.com>
Reviewed-by: James E. Blair <corvus@inaugust.com>
Approved: James E. Blair <corvus@inaugust.com>
Tested-by: Jenkins
2013-05-28 17:00:24 +00:00
Tim Simpson 15c0987690 Changed _get_git_directory() to use git itself.
This lets pbr work on projects that are checked out as submodules.

Change-Id: I8c47a7dbae0bd390bd2529f972ffe9920aed374e
Reviewed-on: https://review.openstack.org/29619
Reviewed-by: Monty Taylor <mordred@inaugust.com>
Reviewed-by: Clark Boylan <clark.boylan@gmail.com>
Approved: Monty Taylor <mordred@inaugust.com>
Tested-by: Jenkins
2013-05-25 07:04:46 +00:00
Chuck Short 61d92ff6d2 python3: Python3.x compatibility
Mechanical change for python3 compatibility

Signed-off-by: Chuck Short <chuck.short@canonical.com>

Change-Id: I43b99f5823101d517a0e55178fbe9ddf20934117
Reviewed-on: https://review.openstack.org/29622
Reviewed-by: Clark Boylan <clark.boylan@gmail.com>
Approved: Jeremy Stanley <fungi@yuggoth.org>
Reviewed-by: Jeremy Stanley <fungi@yuggoth.org>
Tested-by: Jenkins
2013-05-23 19:45:36 +00:00
Monty Taylor 5d0e256f4b Make parse errors meaningful.
This makes the error displays on a bad setup.cfg value go from:

error in setup command: Error parsing setup.cfg: IOError: 2

to

error in setup command: Error parsing setup.cfg: IOError: No such file or
directory: 'README'

Which makes debugging eversomuch better.
2013-05-13 10:20:31 -04:00
Monty Taylor 6d656500f5 Default to single-version-externally-managed
The other thing is always confusing and never what people want.

Change-Id: I915f561da2f74048c24dd324dbe71b5446d39197
Reviewed-on: https://review.openstack.org/28060
Reviewed-by: James E. Blair <corvus@inaugust.com>
Reviewed-by: Clark Boylan <clark.boylan@gmail.com>
Approved: Jeremy Stanley <fungi@yuggoth.org>
Reviewed-by: Jeremy Stanley <fungi@yuggoth.org>
Tested-by: Jenkins
2013-05-06 16:45:40 +00:00
Monty Taylor 52fb3618ed Add config for skipping authors and changelog.
Swift does not want to autogenerate these - so allow them to configure
them off.

Change-Id: I815fcbf9ec8d20f4a1c6cb4e2fe68a2ba8d1e305
Reviewed-on: https://review.openstack.org/27519
Reviewed-by: Clark Boylan <clark.boylan@gmail.com>
Reviewed-by: Jeremy Stanley <fungi@yuggoth.org>
Approved: Jeremy Stanley <fungi@yuggoth.org>
Tested-by: Jenkins
2013-05-06 16:45:38 +00:00
Monty Taylor 9bd7716b2b Update to d2to1 0.2.10.
We fixed a string bug upstream which was released, and also added some
additional backwards_compat options.

Change-Id: I636a47952a90e6e0df864dbdc9243b77eeb6d77e
Reviewed-on: https://review.openstack.org/26968
Reviewed-by: Jeremy Stanley <fungi@yuggoth.org>
Approved: Clark Boylan <clark.boylan@gmail.com>
Reviewed-by: Clark Boylan <clark.boylan@gmail.com>
Tested-by: Jenkins
2013-05-06 16:45:03 +00:00
Erik M. Bray 0d335d0804 Added some additional zest.releaser hooks to deal with some perpetual annoyances of doing releases.
git-svn-id: https://svn.stsci.edu/svn/ssb/stsci_python/d2to1/trunk@24209 fe389314-cf27-0410-b35b-8c050e845b92
2013-04-10 15:47:22 +00:00
Erik M. Bray d1d4f9c234 When catching exceptions from a setup-hook don't throw a traceback up for sys.exit()
git-svn-id: https://svn.stsci.edu/svn/ssb/stsci_python/d2to1/trunk@24204 fe389314-cf27-0410-b35b-8c050e845b92
2013-04-09 15:20:19 +00:00
Monty Taylor 778d76ba2a Don't try to smart find packages that aren't there.
We help out by looking for the obvious stuff. But sometimee, like in
git-review, we don't have a package at all.

Change-Id: Ic575c0008c69ffaba43a637b460899dd848d3fd5
Reviewed-on: https://review.openstack.org/26289
Reviewed-by: James E. Blair <corvus@inaugust.com>
Approved: Clark Boylan <clark.boylan@gmail.com>
Reviewed-by: Clark Boylan <clark.boylan@gmail.com>
Tested-by: Jenkins
2013-04-08 23:50:12 +00:00
Monty Taylor 2796f9add5 Add support for manpages.
Change-Id: I7fc77c48b515437d40f4046324cbff2536296c20
Reviewed-on: https://review.openstack.org/26284
Reviewed-by: Clark Boylan <clark.boylan@gmail.com>
Reviewed-by: Jeremy Stanley <fungi@yuggoth.org>
Approved: Jeremy Stanley <fungi@yuggoth.org>
Tested-by: Jenkins
2013-04-06 01:42:59 +00:00
Monty Taylor 5d39f9220a Support forcing single-version-externally-managed.
git-review needs this to enable manpage installation.

Change-Id: I23ffc654fb2a83319c8d450e91304ae9ed767820
Reviewed-on: https://review.openstack.org/26283
Reviewed-by: Clark Boylan <clark.boylan@gmail.com>
Approved: Jeremy Stanley <fungi@yuggoth.org>
Reviewed-by: Jeremy Stanley <fungi@yuggoth.org>
Tested-by: Jenkins
2013-04-06 01:24:08 +00:00
Monty Taylor 8dff555d19 Add more iterations to BuildDoc coverage.
Using testscenarios, construct more combinations of test options for
the autodoc_index_module option.

Change-Id: I96b2816be2c652478b37c03cb5755a83dfeb0894
Reviewed-on: https://review.openstack.org/25825
Reviewed-by: James E. Blair <corvus@inaugust.com>
Reviewed-by: Clark Boylan <clark.boylan@gmail.com>
Approved: Monty Taylor <mordred@inaugust.com>
Tested-by: Jenkins
2013-04-06 01:24:06 +00:00
Monty Taylor 5b8b7f1d83 Align Sphinx autodoc options with oslo.
The Sphinx autodoc changes also went into olso a little differently.

Change-Id: If1f337db693053f2627c0c426a51bc13128033a7
Reviewed-on: https://review.openstack.org/25676
Reviewed-by: James E. Blair <corvus@inaugust.com>
Reviewed-by: Clark Boylan <clark.boylan@gmail.com>
Approved: Monty Taylor <mordred@inaugust.com>
Tested-by: Jenkins
2013-04-06 01:23:32 +00:00
Monty Taylor 79d5a6cc7d Using __file__ was getting the wrong location.
__file__ is relative to pbr itself inside of a remote pip build.

Change-Id: I76215abadc8a1a95f5e82680593a856e71d262ec
2013-03-29 00:31:58 +01:00
Monty Taylor d0b083d28f Add support for configuring pbr sphinx options.
Change-Id: Idfdd1c8850433bf3ea2439f939756f5c60bb88a1
2013-03-27 16:45:30 +01:00
Monty Taylor d539c3d76b Add support for warnings=errors.
Change-Id: I710439b01b0585e5e97a337387c508ac26faa6c5
2013-03-27 16:34:30 +01:00
Monty Taylor 155e64f050 Fix authors generation from co-authored-by.
It turns out that the reasons we add tests is to run them.

Change-Id: I6212e799c1f11ffb4e9d8b15600edc4b4d885d3e
2013-03-24 18:38:00 +01:00
Monty Taylor 5b3e94254f Ported in Co-authored-by support from oslo.
Change-Id: I2db5b4f22f24686ada7c40fad2da134403812675
2013-03-24 18:21:50 +01:00
Monty Taylor 014afbd2af Fix up the test suite to actually all pass.
Change-Id: Ifc8b2442c03408f489b5f97936f3c9ff35eedca2
2013-03-20 00:18:12 -07:00
Monty Taylor d8c8b7db35 Added version code.
Change-Id: I7e7da2eb238dd6b80b778acec5a23945473f7a74
2013-03-19 21:07:35 -07:00
Monty Taylor 806a5b915b Update tox to run hacking.
pbr can't depend on hacking, because hacking depends on pbr. But,
we can put it into the tox file.

Change-Id: I49d17917f79c167ae7df9bef3f59047e5c12d33e
2013-03-19 18:39:29 -07:00
Monty Taylor 3d10e09ccd Make hacking compliant.
Change-Id: Ibbd091decfe377a43f691aaf26905edb40ff299f
2013-03-19 18:33:08 -07:00
Monty Taylor 1d3422fefd Update documentation for release.
Change-Id: I215bfa00a836c7fafb535b78e6fef89c81e28817
2013-03-17 23:51:59 -07:00
Monty Taylor e8af43a318 Rename back to PBR.
Change-Id: I13ee7fab7858231b0fa17f9116176a09184e8b0e
2013-03-17 23:27:50 -07:00
Monty Taylor ba33408cb5 Remove extra complexity of six.u wrapper. 2013-03-13 13:40:24 -07:00
Monty Taylor 4ec8bb6e29 Move setup_requires to setup_requires_dist.
In anticipation of pep-426
2013-03-12 11:34:22 -04:00
Monty Taylor feabee8fe7 Add a few more backwards compatibility options. 2013-03-11 18:05:35 -04:00
Monty Taylor 34a5291b6f Fix exception handling error.
The exception handler was passing an exception object to the unicode
function, which was not causing it to stringify.
2013-03-11 18:01:28 -04:00
Monty Taylor f15e9db5f5 Fix two minor style things.
There is a pep8 indentation issue and an unused import. Fix them here
so I can verify that my later patches don't regress and become unhappy.
2013-03-10 13:31:03 -04:00
Erik M. Bray 890d9685cd Fixes #20. Make sure the manifest_maker monkeypatch only occurs once and that it gets all its required locals encapsulated. This is why I hate any sort of monkey-patching, but it appears to be the only way to get this feature working.
git-svn-id: https://svn.stsci.edu/svn/ssb/stsci_python/d2to1/trunk@23570 fe389314-cf27-0410-b35b-8c050e845b92
2013-03-06 00:08:49 +00:00
Erik M. Bray 25feae28b3 Yet another Python 2.5 fix; I really ought to just set up my own 2.5 installation 2013-03-05 12:39:27 -05:00
Erik M. Bray e8a1c1abb6 multiprocessing doesn't exist in Python 2.5 2013-03-05 12:24:28 -05:00
Erik M. Bray 06e151665e Adds six.py and makes the necessary tweaks to improve support for using d2to1 natively across Python versions 2013-03-05 12:05:29 -05:00
Erik M. Bray a44c84b90a Fix 'except as' statements that were breaking things in Python 2.5 2013-03-05 11:03:34 -05:00
Erik M. Bray 45ed5ce389 Somehow neglected to include extra-file.txt used in the test for #15. Also moved the info log message that was causing othere tests to fail to only appear when commands are run that actually affect the manifest generation 2013-03-05 09:57:37 -05:00
Erik M. Bray 738616c4a8 Adds support for the tests_require keyword from setuptools. Tested by eating our own dogfood -- ./setup.py test now works for d2to1's own setup. 2013-03-04 08:59:31 -05:00
Thomas Grainger 912865b41f support test suite and test tests-require
Fixes #8
2013-03-04 08:59:31 -05:00
Erik M. Bray 9c3a9b8342 Patch manifest_maker to support extra_files--this is really the only way I can see to do this at all sensibly 2013-02-28 18:40:08 -05:00
Erik M. Bray ea2e44ffc7 This is a test that should really work to test this feature 2013-02-28 18:39:44 -05:00
Erik Bray 79c7c67fb4 Merge branch 'master' into svn
Conflicts:
	d2to1/util.py
	setup.cfg

git-svn-id: https://svn.stsci.edu/svn/ssb/stsci_python/d2to1/trunk@23437 fe389314-cf27-0410-b35b-8c050e845b92
2013-02-25 19:52:45 +00:00
Erik Bray 948efaf0af Rolling back to previous version of resolve_name; it's possible this can fail in the presence of a broken namespace package, but I want to make sure that's the case before trying to fix it.
git-svn-id: https://svn.stsci.edu/svn/ssb/stsci_python/d2to1/trunk@21583 fe389314-cf27-0410-b35b-8c050e845b92
2013-01-16 20:31:03 +00:00
Mark Sienkiewicz e23024a3eb oops - now compatible with python 3
git-svn-id: https://svn.stsci.edu/svn/ssb/stsci_python/d2to1/trunk@21578 fe389314-cf27-0410-b35b-8c050e845b92
2013-01-16 16:50:58 +00:00
Mark Sienkiewicz 1f8b82c304 Any exception that escapes from a hook gets reported along with a stack trace.
I added d2to1.util.nop_hook (prints that it was called) and d2to1.util.exception_hook (raises an exception) for debug/test use.



git-svn-id: https://svn.stsci.edu/svn/ssb/stsci_python/d2to1/trunk@21534 fe389314-cf27-0410-b35b-8c050e845b92
2013-01-11 18:40:34 +00:00
Mark Sienkiewicz 1a106546e4 remove debugging
git-svn-id: https://svn.stsci.edu/svn/ssb/stsci_python/d2to1/trunk@21386 fe389314-cf27-0410-b35b-8c050e845b92
2013-01-07 16:55:24 +00:00
Mark Sienkiewicz 1d14f14987 debugging auto builds
git-svn-id: https://svn.stsci.edu/svn/ssb/stsci_python/d2to1/trunk@21160 fe389314-cf27-0410-b35b-8c050e845b92
2012-12-28 21:24:23 +00:00
Mark Sienkiewicz e5b049f72d debugging auto builds
git-svn-id: https://svn.stsci.edu/svn/ssb/stsci_python/d2to1/trunk@21159 fe389314-cf27-0410-b35b-8c050e845b92
2012-12-28 21:12:57 +00:00
Mark Sienkiewicz 237c3493b5 fix up importer; clean hook name before search
git-svn-id: https://svn.stsci.edu/svn/ssb/stsci_python/d2to1/trunk@21150 fe389314-cf27-0410-b35b-8c050e845b92
2012-12-28 18:24:50 +00:00
Mark Sienkiewicz 8e535f6388 show traceback when a hook encounters an exception
git-svn-id: https://svn.stsci.edu/svn/ssb/stsci_python/d2to1/trunk@21145 fe389314-cf27-0410-b35b-8c050e845b92
2012-12-28 15:41:07 +00:00
Erik Bray 88239e17bd Some changes I made weeks ago but forgot to commit
git-svn-id: https://svn.stsci.edu/svn/ssb/stsci_python/d2to1/trunk@19550 fe389314-cf27-0410-b35b-8c050e845b92
2012-09-17 20:27:48 +00:00
Erik Bray 96d6850b33 Merge branch 'master' of github.com:iguananaut/d2to1
Conflicts:
	README
	d2to1/util.py

git-svn-id: https://svn.stsci.edu/svn/ssb/stsci_python/d2to1/trunk@19547 fe389314-cf27-0410-b35b-8c050e845b92
2012-09-14 21:23:01 +00:00
Erik Bray 080f59d9dd Fixes a bug where entry_points in a setup.py are blanked out if there are no entry points defined in setup.cfg.
git-svn-id: https://svn.stsci.edu/svn/ssb/stsci_python/d2to1/trunk@15185 fe389314-cf27-0410-b35b-8c050e845b92
2012-02-20 23:24:49 +00:00
Erik Bray f6fe1e026e Several changes that I accidentally committed to d2to1's old repository. See the changes to the changelog for more details.
git-svn-id: https://svn.stsci.edu/svn/ssb/stsci_python/d2to1/trunk@15173 fe389314-cf27-0410-b35b-8c050e845b92
2012-02-17 20:53:46 +00:00