From 5c31dfc28c283b732296e6c09f64ce8e6d395687 Mon Sep 17 00:00:00 2001 From: Ram Rachum Date: Wed, 24 Apr 2019 19:05:33 +0300 Subject: [PATCH] Move version into __init__.py --- pysnooper/__init__.py | 11 ++++++++++- setup.py | 4 +++- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/pysnooper/__init__.py b/pysnooper/__init__.py index fb4c068..ee56635 100644 --- a/pysnooper/__init__.py +++ b/pysnooper/__init__.py @@ -1,4 +1,13 @@ # Copyright 2019 Ram Rachum and collaborators. # This program is distributed under the MIT license. -from .pysnooper import snoop \ No newline at end of file +from .pysnooper import snoop +import collections + +__VersionInfo = collections.namedtuple('VersionInfo', + ('major', 'minor', 'micro')) + +__version_info__ = __VersionInfo(0, 0, 16) +__version__ = '.'.join(map(str, __version_info__)) + +del collections, __VersionInfo # Avoid polluting the namespace diff --git a/setup.py b/setup.py index 55f456f..f68013d 100644 --- a/setup.py +++ b/setup.py @@ -6,6 +6,8 @@ This program is distributed under the MIT license. """ import setuptools +import pysnooper + def read_file(filename): """Return the contents of a file""" @@ -15,7 +17,7 @@ def read_file(filename): setuptools.setup( name='PySnooper', - version='0.0.15', + version=pysnooper.__version__, author='Ram Rachum', author_email='ram@rachum.com', description="A poor man's debugger for Python.",