Following OpenStack Style Guidelines[1]: http://docs.openstack.org/developer/hacking/#unit-tests-and-assertraises
[H234] assertEquals() logs a DeprecationWarning in Python 3.x,
use assertEqual() instead. The same goes for assertNotEquals().
Change-Id: I0469bc4d5672d2832b61ec8e3cd283ad06bf380f
These tests aren't actually run by nose because the private decorator
doesn't properly wrap its test. This is also a useful pattern, and so we
move it into its own file (note that even better would be to use
testtools and fixtures, but that's a bigger refactor).
In addition, we don't need to use the git CLI, when we have gitpython,
which produces cleaner code and doesn't spray stuff all over our stderr.
Finally, the outdir creating decorator wasn't as reusable as I thought
it would be, so removing it for inline code for now.
Change-Id: Ibe1b993235b68a1a59bc398ded9c822a02475570
postinstall_dependencies is meant for very fine-grained modification of
the resulting virtual environment. If a user wants to use constraints
after the fact they may then specify those constraints in the
postinstall_dependencies list item.
Change-Id: I21390450fc086d80b16c7ab4d1dc43c81ff590af
This is a global setting that will apply across every project, a
constraint on the versions of things that can be installed via pip.
This is a first pass, adding basic functionality, by allowing a list
of constraint URLs to be provided. Future iterations of this feature may be
tied to a "superrepo" that contains all the projects _and_ the
constraints for those projects all in one place.
Change-Id: Ib5c2dd441b9294b775e755e595486a671d8de57f
Use pep3217 syntax for octal
This allows us to pass the py34 gate checks. Compatible at least with
python 2.7.6 (on Ubuntu 14.04).
Handle urlparse -> urllib.parse
Update to latest GitPython
Fix bad print statements
Fix test unittest comparisons
Change-Id: I79dac5e2c94f8ce5d522801837dbb6ea5e044f13
New option --projects (-p) allows you to only build certain projects
from the manifest you're using.
Example:
giftwrap build -m examples/manifest.yml -t package -p glance cinder
postinstall_dependencies (and probably others) need to have the version
specified with == otherwise the command fails due to < and > being known
as redirects. This adds quotes round the package name, so that bash
doesn't do that.
There are times where you may want to extend or modify the way that
giftwrap builds packages. Short of submitting a pull request or
(worse) forking the repository, there was no easy way to do so.
This change introduces builder drivers with stevedore. By merely adding
entry points in the 'giftwrap.builder.drivers', additional
implementations are now possible.
Defaulting a getdepth to 1 makes it difficult to switch branches if
the branch is not available in the shallow clone, so make this
optional. Also, instantiate OpenstackGitRepo properly: depth is not
the fourth parameter.
Installing pip dependencies interatively (vs. concurrently) provides
for interesting manifest syntax. For example, one could specify
an index-url along side a dependency without affecting the other
dependencies in the list.
There are cases where you would like for a Python module to be
installed *after* the project itself has been installed. This is now
possible with project.postinstall_dependencies.
This change runs builds in parallel. By default all projects run
simultaneously unless --synchronous is specified. This should speed
up build times dramatically.
Previously the two builders had operated as separate build procesess.
What this meant is that when one builder would change, the other would
also need to change in order to support build parity.
This change moves all of the build logic into the base Builder abstract
class. Each sub Builder then implements the necessary primitives to
support the build steps outlined by the base class.
shutil.copytree will fail if the destination directory already exists.
It may exist when other dependencies place an entry there. Therefore,
if it already exists, use shutil.copy2 instead.
Unfortunately, there was an issue where {{ base_path }} was evaluating
to an empty string following merge of:
https://github.com/blueboxgroup/giftwrap/pull/20
This introduces a loop over jinja rendering that will continue until it
is done.
This changes the default for packages to be unlimited depth, but allows setting
the depth on a per project basis. Without this change it's not possible to use
a gitref other than 'master'.
pep8 with 1.6.x is now failing as it wants all imports at the
beginning of the file. Unfortunately, this does not work for us in
all circumstances. Therefore, ignore E402 and fix the E402's where
it actually makes sense.
Designate uses pbr freeze instead of pip freeze. This also explicitly
filters out the project itself when doing the pip install, since pbr
freeze outputs the project itself.
Normally the install_path defaults to base_path/project_name. If you wanted
to do anything else, like base_path/project_name-version you'd have to hard
code the version on the install_path variable for every project. This allows
setting install_path as a templated top level setting. The default reproduces
the existing base_path/project_name behavior.
This change copies $project/etc into the resulting packages. This is useful
for things like no managing rootwrap configs, etc. This is managed with the
new setting 'include_config.'
I clearly wasnt thinking when I implemented building packages in
tempdirs. The problem is that virtualenvs are not (really) relocatable,
so building in a tempdir is realy a no-go. Now ensure that packages are
being built in their destination paths.
Recently, support was added to build packages in temporary directories.
This inadvertently led to a bug wherein when the build is finished, and
the tempdir is removed, the packages were removed with it.
This fix adds the output_dir setting. If set, the packages will be
output to the directory specified, else to the cwd of the giftwrap
process.