From 83fc5632a9435b0ebb342788cab282260433f3c0 Mon Sep 17 00:00:00 2001 From: David Baumgold Date: Thu, 25 Feb 2016 17:49:15 -0500 Subject: [PATCH] Consolidate version, update copyright --- LICENSE | 4 ++-- docs/conf.py | 7 ++++--- flask_misaka.py | 2 ++ setup.py | 15 +++++++++------ 4 files changed, 17 insertions(+), 11 deletions(-) diff --git a/LICENSE b/LICENSE index ff51e28..8dc1cac 100644 --- a/LICENSE +++ b/LICENSE @@ -1,7 +1,7 @@ -Copyright (c) 2012 David Baumgold +Copyright (c) 2012-2016 David Baumgold Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. \ No newline at end of file +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/docs/conf.py b/docs/conf.py index b36b575..73a3dcb 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -18,6 +18,7 @@ # documentation root, use os.path.abspath to make it absolute, like shown here. sys.path.insert(0, os.path.abspath('..')) sys.path.append(os.path.abspath('_themes')) +from flask_misaka import __version__ # -- General configuration ----------------------------------------------------- @@ -42,16 +43,16 @@ # General information about the project. project = u'Flask-Misaka' -copyright = u'2012, David Baumgold' +copyright = u'2012-2016, David Baumgold' # The version info for the project you're documenting, acts as replacement for # |version| and |release|, also used in various other places throughout the # built documents. # # The short X.Y version. -version = '0.1' +version = __version__ # The full version, including alpha/beta/rc tags. -release = '0.1' +release = version # The language for content autogenerated by Sphinx. Refer to documentation # for a list of supported languages. diff --git a/flask_misaka.py b/flask_misaka.py index 0a4bcbc..7162bc6 100644 --- a/flask_misaka.py +++ b/flask_misaka.py @@ -1,5 +1,7 @@ from __future__ import absolute_import, unicode_literals +__version__ = '0.4.1' + import misaka from flask import Markup from copy import copy diff --git a/setup.py b/setup.py index f86f25f..58858a3 100644 --- a/setup.py +++ b/setup.py @@ -1,14 +1,17 @@ +import re from setuptools import setup, find_packages -# http://stackoverflow.com/questions/9352656/python-assertionerror-when-running-nose-tests-with-coverage -try: - from multiprocessing import util # pyflakes.ignore -except ImportError: - pass +version = '' +with open('flask_misaka.py', 'r') as fd: + version = re.search(r'^__version__\s*=\s*[\'"]([^\'"]*)[\'"]', + fd.read(), re.MULTILINE).group(1) + +if not version: + raise RuntimeError('Cannot find version information') setup( name='Flask-Misaka', - version='0.4.0', + version=version, url='https://github.com/singingwolfboy/flask-misaka/', license='MIT', author='David Baumgold',