Stop setting version manually

One of the reasons that pbr exists is to have versions be driven by
signed git tags instead of by content in the source repository. This has
the benefit of being both easier and preventing people from forgetting
to push a git tag when they cut a release.

Additionally, this code is doesn't work for sdist jobs in Zuul upstream
because it requires the project to be importable to run setup.py, but
sdist/wheel generation does not otherwise need to install dependencies.

Remove the override of version in setup.py and replace the hard-coded
version string in oslogmerger.py with the appropriate pbr code.

Change-Id: Ifdbb649b02d7e2fde6e8682e138c81817543fb08
This commit is contained in:
Monty Taylor 2018-07-05 16:54:12 -05:00
parent e08b086914
commit 44d81d873e
No known key found for this signature in database
GPG Key ID: 7BAE94BC7141A594
3 changed files with 3 additions and 3 deletions

View File

@ -13,8 +13,9 @@ import time
import dateutil.parser
import dateutil.tz
from six.moves.urllib.request import urlopen
import pbr.version
__version__ = '1.1.1'
__version__ = pbr.version.VersionInfo('os-log-merger').version_string()
EXTRALINES_PADDING = " " * 40
CACHE_DIR = "%s/oslogmerger-cache/" % tempfile.gettempdir()

View File

@ -1,2 +1,3 @@
pbr
python-dateutil
six

View File

@ -1,8 +1,6 @@
from setuptools import setup
from oslogmerger.oslogmerger import __version__
setup(
version=__version__,
setup_requires=['pbr>=2.0.0'],
pbr=True,
)