view setup.py @ 254:b448bb5a6d9f

Fix help text for 'admin grant' command.
author Daniele Nicolodi <nicolodi@science.unitn.it>
date Fri, 04 Jan 2013 18:45:06 +0100
parents cbbc747949f9
children
line wrap: on
line source

from setuptools import setup, find_packages
import os.path, subprocess

version = '0.8dev'

requires = [
    'distribute',
    'Flask',
    'WTForms',
    'itsdangerous',
    'python-dateutil < 2.0',
]

try:
    import argparse
except ImportError:
    # we have python < 2.7
    requires.append('argparse')

try:
    from collections import OrderedDict
except ImportError:
    # we have python < 2.7
    requires.append('ordereddict')


if version.endswith('dev') and os.path.isdir('.hg'):
    # add hg revision id to version string
    try:
        p = subprocess.Popen(['hg', 'id', '--id'],
                             stdout=subprocess.PIPE, stderr=subprocess.PIPE)
        out, err = p.communicate()
        if not p.returncode:
            rev = out.strip().replace('+', '')
            version += '-' + rev
    except OSError:
        pass


setup(name='ltpdarepo',
      version=version,
      keywords='',
      author='Daniele Nicolodi',
      author_email='nicolodi@science.unitn.it',
      url='http://dev.grinta.net/hg/ltpdarepo/',
      license='AGPLv3+',

      packages=find_packages(),
      package_dir={'': 'src'},
      include_package_data=True,
      zip_safe=False,
      install_requires=requires,
      entry_points={
          'console_scripts': [
              'run = ltpdarepo:main',
              'admin = ltpdarepo.admin:main',
              'sql2dot = ltpdarepo.sql2dot:main' ]
          }
      )