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
Things in the world are moving towards setuptools 0.7, and
there is not a path between distribute and setuptools. Our explicit
dependency on setuptools is causing us to have to write patches to
try to jump through additional hoops to get it to install in the
right contexts.
Fixes bug 1189941
Change-Id: Id7a749c02203100dab52160a551d3548c8a48fd6
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
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
Include logic taken from d2to1 to allow us to inject into setup.py. Combined
with ols openstack/common/setup.py code.
Change-Id: I27b341403bb8245e38f8e3c386f1a835b90b1843
quantum run_tests.py fails because
openstack.common.setup._get_version_from_git fails. It is because
quantum unit tests run under quantum/tests/unit instead of git root dir.
So the function should check parent dirs for .git.
cinder folks seem to have hit this bug (1125416).
ERROR: test_network_gateway_update (quantum.tests.unit.nicira.test_networkgw.NetworkGatewayExtensionTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
File "quantum/quantum/tests/unit/nicira/test_networkgw.py", line 70, in setUp
config.parse(args=args)
File "quantum/quantum/common/config.py", line 99, in parse
version='%%prog %s' % quantum_version.release_string())
File "quantum/quantum/openstack/common/version.py", line 63, in release_string
self.release = self._get_version_from_pkg_resources()
File "quantum/quantum/openstack/common/version.py", line 56, in _get_version_from_pkg_resources
return setup.get_version(self.package)
File "quantum/quantum/openstack/common/setup.py", line 334, in get_version
raise Exception("Versioning for this project requires either an sdist"
Exception: Versioning for this project requires either an sdist tarball, or access to an upstream git repository.
Change-Id: I2e24c00b5ba8f35381cac081ff72d86ea0d75d19
Fixes: bug #1131162 and bug #1125416
Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
In common setup the check for the .git directory is too
restrictive. Instead of checking that it is a directory just
check to see if it exists. That way if the project is part
of a submodule it will continue to work correctly.
Change-Id: If6b6531ab5778ac17537e3f18bde1844620c8316
Fixes: bug 1126416
Found when testing a bug in cinder (1125416), code
relying on throw_on_error won't work because returncode
is None if checked before the communicate() method is
called
Change-Id: I8c9dd00396346ec3ad7bbe1dc17643c385da8d6f
It was pointed out that we missed the use-case that running tests
in a fresh tree checkout should work - and we missed that by
reaching too far into the setup module interface. Shame on us.
Change-Id: Ic0056a3113b308f063d927484e1e4a44c9316a2d
We currently use 'git describe --always' to figure out the number of
commits there have been leading up to the HEAD commit.
However, if there are no tags in the repo, git-describe just returns
the sha hash of HEAD and we fail.
In that case, use 'git rev-list HEAD | wc -l' so we can be #winning.
Change-Id: I345e0ee32189504276b3dfd3367057ce1d4a2b06
In discussions with ttx and zul, it became clear that the git describe info
for our intra-release case wasn't providing any value and was providing
confusion. Additionally, plain git sha's are not providing enough info.
So, the scheme settled on that breaks the least amount of things and yet
still reduces complexity is:
if pre-version: # server projects
try:
use current tag
except:
use pre-version+revcount+gitsha
else:
use git describe | s/-/./
Additionally, we'll use a as a prefix for the revcount, b as the prefix for
the milestone portion of a milestone tag, and rc as the prefix for rc's, so
that for our releases, python version sorting works as expected.
Change-Id: I6f0fe029d225afa8f435bc83216fc144c2402ae0
Everyone hated this, so we decided to get rid of it at the last summit.
Actually, come to think of it, I think we decied to get rid of it in San Fran.
Change-Id: I7d93af1eb98a37ff018730669731a7ee22516279
Fixes bug 1100403
Version 1.1 of pip dropped the -E option. It's not necessary anyway since
running pip in a correctly setup virtualenv will automatically do the right
thing.
Change-Id: Ifec9f27b8dc169d594125a0808126abe77ed42e7
In response to the cessation of per-commit tarballs produced by the CI
systems, simplify the version processing code. We did many many many
complicated things to support producing release artifacts that were not
actually supported release artifacts. After a bunch of issues emerged, it was
determined that the best way forward was to stop producing quasi-not-really
non-release tarballs. If people want to consume versions of openstack that
are not released versions, the git repos are always available.
Additionally, this patch removes versioninfo and just uses PKG-INFO and
pkg_resources to handle version processing.
Change-Id: I5c799f3520adb2ba5288d852543706d81a92f8a1
The libra project added this locally and use it for some docs they make. It
seemed like something we could add what we provide globally.
Change-Id: I219829693568362bbe01354a8f477a10031754c4
Fixes Bug #1052161
"python setup.py build" fails on Windows due to a hardcoded shell path:
/bib/sh.
Change-Id: Iee0a1fcbdabfd469e92fa73002763d419e75ec27
Milestone information in blank for stable branches, so there is no milestone
prefix. However, we were blindly concatenating the milestone version
prefix onto the datestamp.
Fixes bug 1059634.
Change-Id: I6cff4ee7f6c1dc970397b66fd2d15fa22b0a63a3
In practice unclosed file handle leaks are not a huge deal in CPython code,
because reference counting means they get closed automatically in a timely
manner. But they're bad style, and they can become a real problem if the
code is run with a version of Python that doesn't use reference counting.
Change-Id: Ie54b979e26ffc9dd405871ee07c50b304cb36c67
Update generate_authors to ignore the email address
for the stackforge jenkins as well as the main openstack
jenkins, to ignore commits in the history of projects
that were on stackforge before moving over to the
main server (such as ceilometer).
Change-Id: I86d93ba0f358d5d33278847ba8de039642dd54b7
Signed-off-by: Doug Hellmann <doug.hellmann@dreamhost.com>
* openstack/common/setup.py
get_reqs_from_files(): Remove unused variable.
get_reqs_from_files(): Use local variables in a conventional
way, to prevent errors like:
local variable 'datestamp' is assigned to but never used.
Change-Id: I44e137d383b96e1601b7bded1e36e84ff14a8f68
Updates the generate_authors function in setup.py so that
it will skip generation of the authors file if the
SKIP_GENERATE_AUTHORS env variable is set.
Authors doesn't currently take that long to generate but having
the option to explicitly skip it (regardless of whether .git is there)
seems like a good addition.
Change-Id: Ie18064d2450cecc86f18d0b10e1ce473253d1a51
Updates the write_git_changelog function in setup.py so that
it will skip changelog generation if the SKIP_WRITE_GIT_CHANGELOG
env variable is set.
The motivation for this change is to speed up running sdist which
gets executed at the begining of a tox run. Some projects (like Nova)
can take between 10-20 seconds to generate a changelog in this fashion.
Change-Id: I2e75060d303bc8fae784129e8e42f09922a8b09e
Mailmap was broken in 01cec1dcb1a0b8d6a0ba098f8e18ab3c0f7cabab
Revert offending line only to get unit tests passing again.
Change-Id: I33e8d5d3587b429d44ae60f34ca2f132ce233793
Versions driven by git.
If the current revision is tagged, then that's the version cut.
If not, for post-versioning, the current version is the tag plus an count of the
revs since the tag.
For pre-versioning, it's the logic that's in create-tarball.sh.
Additionally, a versioninfo file is added to the tree so that pkg-resources
can find out what the version is.
Change-Id: I5991345735fa14666305538c556b519160b02b4b
The logic is pulled from the nova code, but has been abstracted
from being nova specific. It allows us to duplicate less info,
because we know a lot of the meta information in setup.py anyway.
Once this is in, we'll get autodoc module information everywhere
pretty much for free, and we can delete the doc/ext dir and the
doc/*sh from nova. (thanks to bcwaldon for pushing things to be
better)
Change-Id: I4c55c370ea6c3790958b5412e21e3378f4474104
If we want to use github zipballs as a source of depends sometimes
(which we do) - we need to have the pip-requires parsing understand
that lines starting with http:// or https:// are urls and should go
to dependency_links.
Change-Id: I9218159872d6edfebd4b820e6db912e9aabdf7d7
The pattern of running generate_authors and write_git_changelog
at sdist time is (and should be) repeated in all project's setup.py.
Instead of copying the creation of the two classes and injection
of them into a cmdclass dict, we can do it here and have it
be consistent.
Related to bug 986462.
Change-Id: I0b7b44d58685551482f874b2a6091dec29e6bed6
Bug: 994957
Mailmap might contain mapping with full name. This commit fixes
it to handle these combinations:
Foo ZZ <email@foo.com> Bar YY <email@bar.com>
Foo <email@foo.com> Bar <email@bar.com>
<email@foo.com> <email@bar.com>
This is inline with mailmap convention described here:
http://man.github.com/git/git-shortlog.html
* openstack/common/setup.py
parse_mailmap(): Pull out canonical and alias email addresses.
Change-Id: Iabe9612efecbd18f7a5b0725de7d2515ab24125d
Bug: 976267
The list of such authors are stored in AUTHORS.in file. When
auto generating AUTHORS file, include them as well.
* openstack/common/setup.py
__doc__: For all methods, remove space and include period.
generate_authors(): If AUTHORS.in file exist, append the
content to AUTHORS file.
Change-Id: I05da1e561383cc151e7ef34e75a4600e3afdda6e
Leaving in the branch_nick for now - I think we need to go through the
projects using this code and ensure that they aren't going to get screwed
before we remove it.
Change-Id: Ib91b5af050244f44cd811ca47cb6e2c53ef74ddb
Some of these functions are used in setup.py. In a virtualenv
based workflow, python setup.py sdist is called to create a
tarball which is then installed into the virtualenv. These
functions need to be in a separate file so that they can be
imported by setup.py without eventlet needing to be installed.
Change-Id: I6f7dc9614895b8c91135c62373b98afe55e1fc7d