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.
This commit is contained in:
Sebastian Spaeth 2010-03-22 12:32:44 +01:00
parent 2b32acacbd
commit 2dd0cf8f5b
5 changed files with 28 additions and 14 deletions

18
README
View file

@ -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

View file

@ -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 <Sebastian@SSpaeth.de>"
__VERSION__='0.1.1'
__AUTHOR__ ='Sebastian Spaeth <Sebastian@SSpaeth.de>'

View file

@ -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.

View file

@ -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::

View file

@ -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 <http://notmuchmail.org>`_ 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.