summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorJeff Forcier <jeff@bitprophet.org>2014-08-25 23:48:28 -0700
committerJeff Forcier <jeff@bitprophet.org>2014-08-26 12:52:24 -0700
commit162eebf704b5111d34f430488868d3185d51ba21 (patch)
tree0d5655a20a7439bc71aff023020b809cd57cc256
parentb641c69a80e2bd4737c636e7edd0918d6753c3d0 (diff)
Consolidate version info. Closes #249
Conflicts: paramiko/__init__.py setup.py sites/www/changelog.rst
-rw-r--r--paramiko/__init__.py3
-rw-r--r--paramiko/_version.py2
-rw-r--r--setup.py9
-rw-r--r--sites/www/changelog.rst2
4 files changed, 13 insertions, 3 deletions
diff --git a/paramiko/__init__.py b/paramiko/__init__.py
index d86b868b..65f6f8a2 100644
--- a/paramiko/__init__.py
+++ b/paramiko/__init__.py
@@ -17,14 +17,13 @@
# 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
import sys
+from paramiko._version import __version__, __version_info__
if sys.version_info < (2, 6):
raise RuntimeError('You need Python 2.6+ for this module.')
__author__ = "Jeff Forcier <jeff@bitprophet.org>"
-__version__ = "1.13.2"
-__version_info__ = tuple([ int(d) for d in __version__.split(".") ])
__license__ = "GNU Lesser General Public License (LGPL)"
diff --git a/paramiko/_version.py b/paramiko/_version.py
new file mode 100644
index 00000000..0402fcf2
--- /dev/null
+++ b/paramiko/_version.py
@@ -0,0 +1,2 @@
+__version_info__ = (1, 13, 3)
+__version__ = '.'.join(map(str, __version_info__))
diff --git a/setup.py b/setup.py
index 082a843e..235fd0e3 100644
--- a/setup.py
+++ b/setup.py
@@ -54,9 +54,16 @@ if sys.platform == 'darwin':
setup_helper.install_custom_make_tarball()
+# Version info -- read without importing
+_locals = {}
+with open('paramiko/_version.py') as fp:
+ exec(fp.read(), None, _locals)
+version = _locals['__version__']
+
+
setup(
name = "paramiko",
- version = "1.13.2",
+ version = version,
description = "SSH2 protocol library",
long_description = longdesc,
author = "Jeff Forcier",
diff --git a/sites/www/changelog.rst b/sites/www/changelog.rst
index 0cbc933f..0f79775c 100644
--- a/sites/www/changelog.rst
+++ b/sites/www/changelog.rst
@@ -4,6 +4,8 @@ Changelog
* :support:`378 backported` Minor code cleanup in the SSH config module
courtesy of Olle Lundberg.
+* :support:`249` Consolidate version information into one spot. Thanks to Gabi
+ Davar for the reminder.
* :release:`1.13.2 <2014-08-25>`
* :bug:`376` Be less aggressive about expanding variables in ``ssh_config``
files, which results in a speedup of SSH config parsing. Credit to Olle