Commit Graph

411 Commits

Author SHA1 Message Date
Paul Belanger a4cf44a13a Add build_sphinx test coverage
Change-Id: Ic3baecf71410bfcc50233289aa74f5f1f84296af
Signed-off-by: Paul Belanger <pabelanger@redhat.com>
2015-06-11 11:10:47 -04:00
Paul Belanger e41a9180ed Revert "Remove sphinx_config.init_values() manual call"
This caused in issue in the gate for tox -edocs builds:

   http://logs.openstack.org/15/187715/5/check/gate-infra-specs-docs/a8cae26/console.html

This reverts commit 1dfe9ef348.

Change-Id: Ia6cfbfe5b10a5b714fbb9f21ca61380aaf231638
Signed-off-by: Paul Belanger <pabelanger@redhat.com>
2015-06-09 14:35:55 -04:00
Jenkins dceb9e56dd Merge "builddoc: allow to use fnmatch-style exclusion for autodoc" 2015-06-07 04:06:15 +00:00
Sachi King 1ccd6cd090 Fix test case to be runnable with gnupg 2.1
In gnupg 2.1 %no-ask-passphrase is a no-op.  As a result gpg attempts to
prompt for a passphrase and as the shell is not interactive it fails.

To allow gnupg 2.1 to create passphrase-less keys we enable two options
new to gnupg 2.1.

%no-protection
%transient-key

Change-Id: If687ff005cf968133fc1fa12b1259a127c464e5b
2015-06-05 16:39:35 +10:00
Jenkins 74f61ed2f9 Merge "Move CapturedSubprocess fixture to base" 2015-06-04 16:14:53 +00:00
James Polley 609488e827 Move CapturedSubprocess fixture to base
This fixture is going to be useful in other places as well.

Change-Id: Ib321db7f9c1a4656fd9dcd583f5893ef9bee3ca7
2015-06-03 10:27:04 +10:00
Thomas Bechtold 1dfe9ef348 Remove sphinx_config.init_values() manual call
The function signature for Sphinx's config.init_values() changed since
version 1.3. That leads to:

TypeError: init_values() takes exactly 2 arguments (1 given)

But the function is already correctly called from
application.Sphinx()'s constructor. So use the configuration object
from the application instead of creating an own config object.

Change-Id: I343c26560bfe5116d5348b50b1890b3442ed845a
Closes-Bug: #1379998
2015-06-02 18:40:38 +02:00
Julien Danjou e943f76085 builddoc: allow to use fnmatch-style exclusion for autodoc
This allows to use patterns such as heat.tests.* to exlude modules from
autodoc genereation.

Change-Id: Ibfc4161670fd9344da88c4a85a3aea992fcdf519
2015-05-21 15:00:47 -07:00
Akihiro Motoki 946cf80b75 Make setup.py --help-commands work without testrepository
testr command is registered by pbr.hooks.commands if
testrepository is installed, so there is no need to
setup the entry point in setup.cfg.

Change-Id: I95aae12d1ac810b6d1d09b71f2a0d87be5ccb6ab
Closes-Bug: #1375048
2015-05-21 08:10:00 +09:00
Elena Ezhova b72e4467e1 Remove self.pre_run calls in packaging.py
pre_run was a method of _PipInstallTestRequires class which was
removed by https://review.openstack.org/#/c/181785/.

Change-Id: I2118f2a96d0c9984797424e5dda47547c8e24621
Closes-Bug: #1456663
2015-05-20 00:01:07 +03:00
Jenkins 9026f3627b Merge "Teach pbr to read extras and env markers" 2015-05-15 13:12:41 +00:00
James Polley 2b29c4fc2b Teach pbr to read extras and env markers
This adds support for reading extras from setup.cfg.

It also adds support for handling environment markers, both in the
extras section and in install_requires and in requirements.txt.

Change-Id: I6fd8276012e65f82934df9c374613b1ce6856b5a
2015-05-15 21:31:21 +10:00
Jenkins 6bc1de6098 Merge "Finish removing invocations of pip." 2015-05-15 04:01:14 +00:00
Robert Collins 0f4caa1057 Bump integration test timeouts.
Node load is too variable.

Change-Id: If03cd577ea18bfad4b53fcddb7a87e48eefe84c1
2015-05-14 19:35:50 +12:00
Robert Collins d67f22fc3f Finish removing invocations of pip.
We don't depend on recursive installations via pip - and pip certainly
doesn't support that. We removed part of it recently, finish removing
it all.

Change-Id: I29bc4070b355e52124ceae459ea20403d134b60a
2015-05-12 09:31:20 +12:00
Jenkins 44ee5f0d0c Merge "Issue #1451976: handle commits with non-utf8 text" 2015-05-06 04:20:36 +00:00
Robert Collins d689d9af9c Issue #1451976: handle commits with non-utf8 text
History may have commits with non utf8 text in them. Rather than
forcing users to rebase, handle it gracefully.

Change-Id: I6f6302c815b02234e27ee31f7ce87eab101b40ea
Closes-Bug: #1451976
2015-05-06 06:37:30 +12:00
Jenkins 8c22c67bda Merge "Stop re-invoking pip" 2015-05-04 20:00:03 +00:00
Jenkins bcb2022eb0 Merge "Allow overwriting sphinx builder from command line" 2015-05-04 13:43:53 +00:00
Robert Collins cfd8ab2dec Parallelise integration tests.
This involves moving the inner loop to python because
existing-tooling.

Change-Id: Iaad811a0248a3f700e655bd8be656d183deead93
2015-05-02 09:05:54 +12:00
Robert Collins a67e2c346c Issue #1450210: Preversioning rc tag handling
We were generating versions lower than the last tag when preversioning
was in use and pre-release versions had been tagged.

Also attempt to run the script without devstack.

Change-Id: If984939003ae7c513ee76b52c6808db0c1766050
Closes-Bug: #1450210
2015-04-30 11:26:00 +12:00
Monty Taylor ad16aa2f3e Stop re-invoking pip
It turns out we need to just inject into install_requires so that pip's
egg_info processing will do the right thing for dependencies.

Change-Id: Ia6c4725b153b19c3d7e422b1fa62b70cded686e2
2015-04-25 12:01:16 -04:00
Jeremy Stanley 52fcd502bf Be safe, don't let friends use RawConfigParser
Replace uses of ConfigParser() and RawConfigParser() with
SafeConfigParser().

Change-Id: I78395eae381e1b911ab6b48c572665f4601ec315
2015-04-23 18:42:16 +00:00
Jenkins d6b0ca31a1 Merge "Revert "Support platform-specific requirements files"" 2015-04-21 08:23:09 +00:00
lifeless 5ad364f251 Revert "Support platform-specific requirements files"
This reverts commit 8cdb41cf12.

https://www.python.org/dev/peps/pep-0426/#environment-markers is the
right approach for this, and as we haven't released master its safe to
back this out.

Change-Id: Ic7298fcbde54c6beda67c3c897efa75f1b60b78f
2015-04-17 11:38:55 +12:00
Robert Collins e4b7541598 Reinstate pure-git-hashes-are-illegal test.
When we removed output support for git hashes we also removed parsing
support for them. This would be ok (but rough on users), except that
we also removed the test that a pure git hash is an illegal version,
which should have stayed.

Change-Id: Idd8bc470fab1711d8555a793b1294b0977ba106d
2015-04-17 10:08:54 +12:00
Dave Walker (Daviey) 1b4a8bd554 Ignore non-release related tags
Previously we were accepting many string tags to be release
tags for versions.  This change enforces tags that are
considered to start with a digit, and ignore if not.

Change-Id: Ib1ca0eda62e375cdee70d35ed7c82a544082ef0a
Closes-bug: 1403124
Signed-off-by: Dave Walker (Daviey) <email@daviey.com>
2015-04-17 10:06:51 +12:00
Robert Collins da0f226cc4 Test that MANIFEST.in excludes work
We were not testing that MANIFEST.in excludes work.

Change-Id: Id6e1d1651a930379b18e4d9efe2e3a8baa03dc12
Closes-Bug: #1373152
2015-04-15 19:06:06 +12:00
Robert Collins 2465a4cac7 Fixup semver
The semver doc that Monty wrote was great, but doesn't work in the
real world. Specifically because 1.dev1 < 1.a1, we're unable to
depend on alphas without our testing getting locked down to the alpha
on PyPI rather than the revision we're trying to test.

This update fixes that by allowing 1.a1.dev1, audits for consistency
with PEP-440, fixes up the contact details now that this is team
maintained and notes that its as much Python specific as Linux
specific. We also remove the never-in-a-release
SemanticVersion.to_release method, as YAGNI.

Change-Id: I005a2386842633e9fcda76adfc523196c8c2c95d
Sem-Ver: feature
2015-04-15 19:06:05 +12:00
Robert Collins 82f3b535c0 Better diagnostics on test failure
I was tracking down some test failures, which turned out to be a
missing Python.h, but this was hard to figure out without the stderr
output.

Change-Id: I0d0cf2440f5cd8b6ba3c0278fe7be5006a602a34
2015-04-14 13:49:57 +12:00
Jenkins aa30d0c465 Merge "Add truncated lincense text" 2015-03-24 15:06:59 +00:00
Monty Taylor b692905a6c Don't avoid egg-info quite so often
There are times when we need to run egg-info more frequently than we
had before.

Change-Id: Ie6ec39f7db28ec7807f1a74bc724f0781380c6cc
Closes-Bug: 1433681
2015-03-18 13:06:43 -04:00
Masaki Matsushita 07aee3241f Add truncated lincense text
Change-Id: I2da74726cd56f9d29123e8ee3ed79b97d312a27e
Closes-Bug: #1428211
2015-03-18 16:09:57 +09:00
Darragh Bailey 702042e796 Allow overwriting sphinx builder from command line
The build_sphinx setuptools command supports selection of a builder.
Support the behaviour of being able to explicitely select any builder
available to sphinx via "python setup.py build_sphinx -b linkcheck", not
just one of the builders specified in the configuration file.

Change-Id: I4c7ddcaf413e1bcc72550b3d920f8a777a710c97
2015-03-04 19:03:38 +00:00
Ralf Haferkamp e5e13df52e "packages" might list multiple directories
Treat each of the separately when searching for packages in there..

Change-Id: Icb2e2cf2a9cac3d15141aeb8ffad0e38f76cf2e7
Closes-Bug: #1426449
2015-02-27 17:41:29 +01:00
Jenkins 8817e7bfa4 Merge "Fixes Windows generated scripts headers" 2015-02-09 13:51:53 +00:00
Monty Taylor 381b6471b6 Support script text override for newer develop
setuptools > 12 has a new flow for writing out generated script text.
It's nicer, actually, because it means we can just subclass and extend
one method instead of monekypatching.

Change-Id: I56e7bea60df8a59d859575d426ce93c45ffee314
2015-01-28 07:05:53 -08:00
Lucian Petrut f95d7d7bb9 Fixes Windows generated scripts headers
When installing packages on Windows, generated scripts based on entry
points have wrong Python executable paths in the header. For this
reason, generated executables fail with 'fail to create proccess'.

For example, if the Python executable path is
'C:\Program Files\Python27\python.exe', the scripts will contain
'#!C:ProgramFilesPython27python.exe'

A simple fix is to wrap the Python executable in brackets on Windows.

Change-Id: Id017073c58c162c3e0c546b1ab76a7bea9a9f04e
Closes-Bug: #1416342
2015-01-28 03:44:50 +02:00
Jeremy Stanley 4151d5c89a Use unsafe OpenPGP keys for testing
* pbr/tests/test_packaging.py(GPGKeyFixture.setUp): Testing signed
tags requires an OpenPGP key, but doesn't actually require one
entropic enough for safe production use. When generating a test key
with gpg add the little-known --quick-random/--debug-quick-random
option used by GnuPG's own testsuite. You can find it by searching
the source code, or in the NEWS file entry for the rather ancient
GnuPG 0.2.3 release, or in the debug option summary for 2.x.

Change-Id: I589f5c7db04b8e715c7a53cfa2fa18d37e20c66d
Closes-Bug:#1369768
2014-12-23 16:16:12 +00:00
Clark Boylan 3ec9f0e809 Move write_pbr_json to avoid issues with nose
Put write_pbr_json in pbr.pbr_json so that you do not need to import
pbr.packaging to use it. This avoids python3 errors with nose where nose
is imported by pbr before it is converted to python3 by 2to3 under
python3.

Change-Id: I1c420fed609bc60bbfdf78eb219e067ccab1a61e
2014-12-21 22:21:48 +00:00
Clark Boylan 50a43a18d1 Properly check for git before getting git dir
We cannot get the git dir if git is not installed. Check that git is
installed before querying for the git dir. Return None if the git dir
cannot be found or if git is not installed.

Change-Id: Ic8e0c74a779b23842369a8cf01fcbf37885202ef
Fixes-bug: 1326682
(cherry picked from commit e7d2825d39)
2014-12-21 22:21:32 +00:00
Monty Taylor c01b8dae1e Port in git sha changes from 0.10 line
Stop including git sha in version strings

We include it in pbr.json now. Including it is contentious in the world
of python, and it's up for debate as to whether or not it provides value.

Write and read more complex git sha info

Instead of encoding the git sha into the version string, add it to
a metadata file. This will allow us to get out of the business of
arguing with pip and setuptools about version info. In order to make
this really nice, provide a command line utility called "pbr" that has
subcommands to print out the metadata that we're now including in the
egg-info dir.

Only import sphinx during hook processing

When pbr is imported to handle writing the egg_info file because of
the entry point, it's causing sphinx to get imported. This has a
cascading effect once docutils is trying to be installed on a system
with pbr installed. If some of the imports fail along the way, allow
pbr to continue usefully but without the Sphinx extensions
available. Eventually, when everything is installed, those
extensions will work again when the commands for build_sphinx, etc.
are run separately.

Also slip in a change to reorder the default list of environments
run by tox so the testr database is created using a dbm format
available to all python versions.

Integration test PBR commits

Make sure that if a PBR commit is being tested then we install and
use that source rather than the latest PBR release.

Change-Id: Ie121e795be2eef30822daaa5fe8ab1c2315577ae
(cherry picked from commit 65f4fafd90)
(cherry picked from commit cd7da23937)
Closes-Bug: #1403510
Co-Authored-By: Clark Boylan <clark.boylan@gmail.com>
Co-Authored-By: Doug Hellmann <doug@doughellmann.com>
Co-Authored-By: Jeremy Stanley <fungi@yuggoth.org>
2014-12-21 22:20:49 +00:00
Claudiu Popa 8cdb41cf12 Support platform-specific requirements files
This patch adds support for choosing a requirements file, based on the
current OS, with the format 'requirements-{osname}'. This can be combined
with the current approach of choosing a requirement file based on the
Python version. The motivation for this is to replace conditional
choosing of packages inside setup.py.

Change-Id: I30c56082bb9b9bcd80128eedcef17b6beb793cf8
2014-11-24 11:20:32 +02:00
Jenkins e0d2674102 Merge "Fixes a spelling error" 2014-10-15 22:25:08 +00:00
Jenkins f7537c5499 Merge "Adds option for excluding files from autodoc trees" 2014-10-14 14:03:09 +00:00
Jenkins 787d63dca2 Merge "Remove extraneous vim editor configuration comments" 2014-10-14 11:44:04 +00:00
Jenkins fc474b731b Merge "autodoc: allow to exclude modules from auto-generation" 2014-10-09 23:27:25 +00:00
Jenkins 3a3e3c8dda Merge "tests: factorize has_opt handling" 2014-10-09 23:27:15 +00:00
Christian Berendt 24c8ad99fd Remove extraneous vim editor configuration comments
Change-Id: I9af2d95d19e170a30f872112b4571196dc98d393
Partial-Bug: #1229324
2014-10-08 23:05:20 +02:00
Jenkins 1e7d8951d2 Merge "Add user.name to git config in tests" 2014-09-22 00:36:56 +00:00
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