Skip to content

Commit

Permalink
Merge pull request #850 from lbdreyer/version_fix
Browse files Browse the repository at this point in the history
Update other version numbers .
  • Loading branch information
bjlittle authored Feb 3, 2017
2 parents a4375f2 + 858c9a6 commit d80e5df
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 3 deletions.
3 changes: 2 additions & 1 deletion docs/source/_static/version_switch.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@
'use strict';

var all_versions = {
'latest': '0.14',
'latest': '0.15',
'v0.14': '0.14',
'v0.13': '0.13',
'v0.12': '0.12',
'v0.11': '0.11',
Expand Down
17 changes: 15 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# (C) British Crown Copyright 2011 - 2016, Met Office
# (C) British Crown Copyright 2011 - 2017, Met Office
#
# This file is part of cartopy.
#
Expand Down Expand Up @@ -96,6 +96,19 @@ def find_package_tree(root_path, root_package):
return packages


def extract_version():
version = None
fdir = os.path.dirname(__file__)
fnme = os.path.join(fdir, 'lib', 'cartopy', '__init__.py')
with open(fnme) as fd:
for line in fd:
if (line.startswith('__version__')):
_, version = line.split('=')
version = version.strip()[1:-1] # Remove quotation characters
break
return version


class MissingHeaderError(Exception):
"""
Raised when one or more files do not have the required copyright
Expand Down Expand Up @@ -335,7 +348,7 @@ def get_config_var(name):
# ==========
setup(
name='Cartopy',
version='0.14.4.dev0',
version=extract_version(),
url='http://scitools.org.uk/cartopy/docs/latest/',
download_url='https://github.com/SciTools/cartopy',
author='UK Met Office',
Expand Down

0 comments on commit d80e5df

Please sign in to comment.