Skip to content

Commit

Permalink
make version an artifact of mdlib
Browse files Browse the repository at this point in the history
  • Loading branch information
nicferrier committed Nov 20, 2011
1 parent d45a451 commit 74104ee
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 2 deletions.
10 changes: 9 additions & 1 deletion setup.py
Expand Up @@ -2,6 +2,14 @@
#from setuptools import find_packages
from setuptools import setup


# Get the version
import os.path
import sys
sys.path = [os.path.join(os.path.dirname(__file__), "src")] + sys.path
from mdlib import __version__ as md_version


classifiers = [
'Development Status :: 3 - Alpha',
'Intended Audience :: Developers',
Expand All @@ -17,7 +25,7 @@
# cmdln
setup(
name = "md",
version = "0.70",
version = md_version,
description = "Maildir command line mail client and library",
long_description = """A command line tool and shell to allow use of
a maildir directly. Fully fledged MUAs should be trivial to build on top of this.""",
Expand Down
2 changes: 1 addition & 1 deletion src/mdlib/__init__.py
Expand Up @@ -21,7 +21,7 @@
"""

__author__= "nic ferrier - nic@ferrier.me.uk"
__version__ = "0.1"
__version__ = "0.80"

import sys
import re
Expand Down
5 changes: 5 additions & 0 deletions src/mdlib/cli.py
Expand Up @@ -42,6 +42,7 @@
import sys
import re

from mdlib import __version__ as md_version
from mdlib import MdClient

## This should be redefined as an option and a thread local
Expand Down Expand Up @@ -81,6 +82,10 @@ def get_optparser(self):
def maildir(self):
return getattr(self.options, "maildir", MAILDIR) or MAILDIR

def do_version(self, subcmd, opts):
"""${cmd_name}: what version are we?"""
print(md_version, file=self.stdout)

def do_lsfolders(self, subcmd, opts):
"""${cmd_name}: list the sub folders of the maildir.
Expand Down

0 comments on commit 74104ee

Please sign in to comment.