Skip to content

Commit

Permalink
Drop .devNNNN from version number
Browse files Browse the repository at this point in the history
Signed-off-by: Jim Easterbrook <jim@jim-easterbrook.me.uk>
  • Loading branch information
jim-easterbrook committed Feb 23, 2016
1 parent 05b812c commit 29f5a0a
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 21 deletions.
15 changes: 6 additions & 9 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,6 @@

# get GitHub repo information
# requires GitPython - 'sudo pip install gitpython --pre'
next_release = '.'.join(__version__.split('.')[:3])
version = next_release
try:
import git
except ImportError:
Expand All @@ -63,12 +61,11 @@
patch = int(patch) + 1
else:
patch = 0
next_release = today.strftime('%y.%m') + '.%d' % patch
version = next_release + '.dev%s' % _release
__version__ = today.strftime('%y.%m') + '.%d' % patch
vf = open('src/pywws/__init__.py', 'r')
old_init_str = vf.read()
vf.close()
new_init_str = "__version__ = '" + version + "'\n"
new_init_str = "__version__ = '" + __version__ + "'\n"
new_init_str += "_release = '" + _release + "'\n"
new_init_str += "_commit = '" + _commit + "'\n"
if new_init_str != old_init_str:
Expand Down Expand Up @@ -148,7 +145,7 @@ class extract_messages_doc(BuildDoc):
class upload_and_tag(upload):
def run(self):
import git
message = next_release + '\n\n'
message = __version__ + '\n\n'
with open('CHANGELOG.txt') as cl:
while not cl.readline().startswith('Changes'):
pass
Expand All @@ -158,7 +155,7 @@ def run(self):
break
message += line + '\n'
repo = git.Repo()
tag = repo.create_tag(next_release, message=message)
tag = repo.create_tag(__version__, message=message)
remote = repo.remotes.origin
remote.push(tags=True)
return upload.run(self)
Expand All @@ -173,12 +170,12 @@ def run(self):
long_description = ldf.read()

setup(name = 'pywws',
version = next_release,
version = __version__,
description = 'Python software for wireless weather stations',
author = 'Jim Easterbrook',
author_email = 'jim@jim-easterbrook.me.uk',
url = 'http://jim-easterbrook.github.com/pywws/',
download_url = 'https://pypi.python.org/pypi/pywws/%s' % next_release,
download_url = 'https://pypi.python.org/pypi/pywws/%s' % __version__,
long_description = long_description,
classifiers = [
'Development Status :: 5 - Production/Stable',
Expand Down
9 changes: 5 additions & 4 deletions src/doc/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
#
# pywws - Python software for USB Wireless Weather Stations
# http://github.com/jim-easterbrook/pywws
# Copyright (C) 2008-15 pywws contributors
# Copyright (C) 2008-16 pywws contributors

# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
Expand Down Expand Up @@ -90,7 +90,7 @@ def __getattr__(self, name):

# General information about the project.
project = u'pywws'
copyright = u'2008-15, pywws contributors'
copyright = u'2008-16, pywws contributors'

# The version info for the project you're documenting, acts as replacement for
# |version| and |release|, also used in various other places throughout the
Expand All @@ -100,8 +100,9 @@ def __getattr__(self, name):
#version =
# The full version, including alpha/beta/rc tags.
#release =
from pywws import __version__ as release
version = release[:release.rfind('.')]
from pywws import __version__, _release
version = __version__
release = __version__ + '.dev' + _release

# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
Expand Down
7 changes: 4 additions & 3 deletions src/pywws/Logger.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

# pywws - Python software for USB Wireless Weather Stations
# http://github.com/jim-easterbrook/pywws
# Copyright (C) 2008-14 Jim Easterbrook jim@jim-easterbrook.me.uk
# Copyright (C) 2008-16 pywws contributors

# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
Expand All @@ -28,7 +28,7 @@
import logging.handlers
import sys

from . import __version__
from . import __version__, _release, _commit

def ApplicationLogger(verbose, logfile=None):
logger = logging.getLogger('')
Expand All @@ -45,6 +45,7 @@ def ApplicationLogger(verbose, logfile=None):
logging.Formatter('%(asctime)s:%(name)s:%(message)s', datefmt))
logger.addHandler(handler)
pywws_logger = logging.getLogger('pywws.Logger')
pywws_logger.warning('pywws version %s', __version__)
pywws_logger.warning(
'pywws version %s, build %s (%s)', __version__, _release, _commit)
pywws_logger.info('Python version %s', sys.version)
return logger
6 changes: 3 additions & 3 deletions src/pywws/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
__version__ = '16.02.0.dev1346'
_release = '1346'
_commit = '720f223'
__version__ = '16.02.0'
_release = '1347'
_commit = '05b812c'
5 changes: 3 additions & 2 deletions src/pywws/version.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# pywws - Python software for USB Wireless Weather Stations
# http://github.com/jim-easterbrook/pywws
# Copyright (C) 2008-14 Jim Easterbrook jim@jim-easterbrook.me.uk
# Copyright (C) 2008-16 pywws contributors

# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
Expand Down Expand Up @@ -39,7 +39,7 @@
from pkg_resources import resource_filename
import sys

from . import __version__, _commit
from . import __version__, _release, _commit

def main(argv=None):
if argv is None:
Expand Down Expand Up @@ -67,6 +67,7 @@ def main(argv=None):
return 2
print __version__
if verbose:
print 'build:', _release
print 'commit:', _commit
print 'Python:', sys.version
try:
Expand Down

0 comments on commit 29f5a0a

Please sign in to comment.