From 2dd0cf8f5bbf63c0e0a423344de95e9d433bf7af Mon Sep 17 00:00:00 2001 From: Sebastian Spaeth Date: Mon, 22 Mar 2010 12:32:44 +0100 Subject: [PATCH 1/1] Make __VERSION__ available via cnotmuch.notmuch.__VERSION__ and improve README Rather than hardcoding the version in various places, we export it from the module itself. Also improve the README somewhat. --- README | 18 ++++++++++++++++-- cnotmuch/notmuch.py | 5 ++--- docs/source/conf.py | 9 +++++---- docs/source/index.rst | 2 +- setup.py | 8 ++++---- 5 files changed, 28 insertions(+), 14 deletions(-) diff --git a/README b/README index 14a35ae8..9caf32dc 100644 --- a/README +++ b/README @@ -1,12 +1,26 @@ cnotmuch -- The python interface to notmuch.so ============================================== -To create the documentation with sphinx installed, go to the docs directory and + +This module makes the functionality of the notmuch library +(`http://notmuchmail.org`_) available to python. Successful import of +this modul depends on a libnotmuch.so|dll being available on the +user's system. + +If you have downloaded the full source tarball, you can create the +documentation with sphinx installed, go to the docs directory and "make html". A static version of the documentation is available at: -http://spaetz.bitbucket.org +`http://spaetz.bitbucket.org`_ +The current source code is being hosted at +http://bitbucket.org/spaetz/cnotmuch which also provides an issue +tracker, and release downloads. This package is tracked by the python +package index repository at `http://pypi.python.org/pypi/cnotmuch`_ and can thus be installed on a user's computer easily via "sudo easy_install cnotmuch" (you will still need to install the notmuch shared library separately as it is not included in this package). + +The original source has been provided by (c)Sebastian Spaeth, 2010. All code is available under the GNU GPLv3+ (see docs/COPYING) unless specified otherwise. + Usage ----- For more examples of how to use the cnotmuch interface, have a look at the diff --git a/cnotmuch/notmuch.py b/cnotmuch/notmuch.py index 70ee0b90..f06929d7 100644 --- a/cnotmuch/notmuch.py +++ b/cnotmuch/notmuch.py @@ -39,6 +39,5 @@ from ctypes import c_int, c_char_p from database import Database,Tags,Query,Messages,Message,Tags from cnotmuch.globals import nmlib,STATUS,NotmuchError __LICENSE__="GPL v3+" -__VERSION__=0.1 -__AUTHOR__ ="Sebastian Spaeth " - +__VERSION__='0.1.1' +__AUTHOR__ ='Sebastian Spaeth ' diff --git a/docs/source/conf.py b/docs/source/conf.py index ee22837f..ca959894 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -16,8 +16,9 @@ import sys, os # If extensions (or modules to document with autodoc) are in another directory, # add these directories to sys.path here. If the directory is relative to the # documentation root, use os.path.abspath to make it absolute, like shown here. -sys.path.append(os.path.abspath('../..')) +sys.path.insert(0,os.path.abspath('../..')) +from cnotmuch.notmuch import __VERSION__,__AUTHOR__ # -- General configuration ----------------------------------------------------- # Add any Sphinx extension module names here, as strings. They can be extensions @@ -39,16 +40,16 @@ master_doc = 'index' # General information about the project. project = u'cnotmuch' -copyright = u'2010, Sebastian Spaeth' +copyright = u'2010, ' + __AUTHOR__ # 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/docs/source/index.rst b/docs/source/index.rst index e04bc843..468a3c91 100644 --- a/docs/source/index.rst +++ b/docs/source/index.rst @@ -13,7 +13,7 @@ The classes :class:`notmuch.Database`, :class:`notmuch.Query` provide most of th :License: This module is covered under the GNU GPL v3 (or later). -This page contains the main API overview. More information on specific topics can be found on the following pages: (none here yet) +This page contains the main API overview of cnotmuch |release|. More information on specific topics can be found on the following pages: (none here yet) Notmuch can be imported as:: diff --git a/setup.py b/setup.py index ba41de19..22d44d3e 100644 --- a/setup.py +++ b/setup.py @@ -1,14 +1,14 @@ #!/usr/bin/env python from distutils.core import setup - +from cnotmuch.notmuch import __VERSION__ setup(name='cnotmuch', - version='0.1', - description='Python binding og the notmuch mail search and indexing library.', + version=__VERSION__, + description='Python binding of the notmuch mail search and indexing library.', author='Sebastian Spaeth', author_email='Sebastian@SSpaeth.de', url='http://bitbucket.org/spaetz/cnotmuch/', - download_url='http://bitbucket.org/spaetz/cnotmuch/get/v0.1.tar.gz', + download_url='http://bitbucket.org/spaetz/cnotmuch/get/v'+__VERSION__+'.tar.gz', packages=['cnotmuch'], keywords = ["library", "email"], long_description="""The cnotmuch module provides an interface to the `notmuch `_ functionality, directly interfacing with a shared notmuch library. Notmuch provides a maildatabase that allows for extremely quick searching and filtering of your email according to various criteria. -- 2.43.0