#!/usr/bin/env python
"""
$URL: svn+ssh://svn.mems-exchange.org/repos/trunk/sancho/setup.py $
$Id: setup.py 29783 2007-04-25 14:04:28Z dbinger $
"""
from distutils.core import setup
from __init__ import __version__
import sys
import re

if 'sdist' in sys.argv:
    # Make sure that version numbers have all been updated.
    PAT = re.compile(r'\b%s\b' % re.escape(__version__))
    assert len(PAT.findall(open("LICENSE.txt").read())) == 12, __version__
    assert PAT.search(open("CHANGES.txt").readline()), __version__

    # Make sure that copyright statements are current.
    from datetime import datetime
    year = datetime.now().year
    copyright = "Copyright (c) %s Corporation for National Research Initiatives" % year
    assert open("README.txt").read().count(copyright) == 1

setup(name = "Sancho",
      version = __version__,
      description = "A simple unit testing framework",
      author = "CNRI",
      author_email = "webmaster@mems-exchange.org",
      url = "http://www.mems-exchange.org/software/sancho/",
      license = "see LICENSE.txt",
      package_dir = {"sancho": "."},
      packages = ["sancho"],
      scripts = ["urun.py"],
      platforms = ['Python 2.3'],
     )
