From 42b48c75ac859bbbfc228864fa35c4b1c1f2f9e6 Mon Sep 17 00:00:00 2001 From: Jordan Suchow Date: Thu, 17 Sep 2015 22:25:18 -0700 Subject: [PATCH 1/2] Consolidate hardcoding of version number --- proselint/command_line.py | 3 ++- proselint/version.py | 1 + setup.py | 3 ++- 3 files changed, 5 insertions(+), 2 deletions(-) create mode 100644 proselint/version.py diff --git a/proselint/command_line.py b/proselint/command_line.py index 0c59483bf..57d57004d 100644 --- a/proselint/command_line.py +++ b/proselint/command_line.py @@ -22,6 +22,7 @@ import time import importlib import sys +from .version import __version__ base_url = "prose.lifelinter.com/" @@ -167,7 +168,7 @@ def proselint(file=None, version=None, initialize=None, """Define the linter command line API.""" # Return the version number. if version: - print("v0.0.1") + print(__version__) return # Run the intialization. diff --git a/proselint/version.py b/proselint/version.py new file mode 100644 index 000000000..d3ec452c3 --- /dev/null +++ b/proselint/version.py @@ -0,0 +1 @@ +__version__ = "0.2.0" diff --git a/setup.py b/setup.py index e6c0f8a82..bf99138db 100644 --- a/setup.py +++ b/setup.py @@ -1,10 +1,11 @@ """Installation script for proselint.""" from setuptools import setup +from proselint.version import __version__ setup( name='proselint', - version='0.1', + version=__version__, description='Making your writing better', url='http://github.com/amperser/proselint', author='Jordan Suchow', From a6a3b18a2c915648fa1cff9f8a2bef6171ff1ec4 Mon Sep 17 00:00:00 2001 From: Jordan Suchow Date: Thu, 17 Sep 2015 22:42:47 -0700 Subject: [PATCH 2/2] Add a docstring to the version file --- proselint/version.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/proselint/version.py b/proselint/version.py index d3ec452c3..18d13e5fe 100644 --- a/proselint/version.py +++ b/proselint/version.py @@ -1 +1,3 @@ +"""Wallace version number.""" + __version__ = "0.2.0"