from setuptools import setup, find_packages

version = '0.1.2dev'

# Always write version.txt to indicate which revision is used for this version.
try:
    import bzrlib.branch
    branch = bzrlib.branch.Branch.open('.')
    revision_number, revision_id = branch.last_revision_info()
    versiontxt = file('version.txt', 'w')
    versiontxt.truncate(0)
    versiontxt.write(version+'-r'+str(revision_number))
    if 'dev' in version:
        # Include revision number in eggname if this is a dev egg.
        version+='-r'+str(revision_number)
except bzrlib.errors.NotBranchError:
    pass
except ImportError:
    # Just ignore
    pass

setup(name='ztm.security',
      version=version,
      description="Handles security in ztm.topicmaps.",
      long_description="""ztm.security ensures that typing and
     roleplaying topics are marked with interfaces so that they can be addressed through the 
     component architecture of Zope 3.""",
      keywords='topicmaps, topicmanagement',
      author='ztmproject.org',
      author_email='ztm@ztmproject.org',
      url='http://ztmproject.org/',
      license='LGPL3',
      # Get more from http://www.python.org/pypi?%3Aaction=list_classifiers
      classifiers=['Programming Language :: Python',
                   'Environment :: Web Environment',
                   'Framework :: Zope3',
                   ],
      dependency_links=[ "http://ztmproject.org/snapshots/" ],
      extras_require={ 'test': [ 'zope.app.testing'
                               , 'zope.securitypolicy'
                               , 'zope.annotation'
                               ]
                     , 'i18n': [ 'cc.gettext', 'zope.app.applicationcontrol' ]
                     , 'buildout': ['collective.recipe.bootstrap']
                     , 'documentation': [ 'collective.recipe.sphinxbuilder'
                                        , 'repoze.sphinx.autointerface'
                                        , 'sphinxcontrib-aafig'
                                        , 'PIL'
                                        , 'docutils>=0.6'
                                        ]
                     },
      packages=find_packages('src'),
      package_dir = {'': 'src'},
      namespace_packages = ['ztm'],
      include_package_data=True,
      zip_safe=False,
      install_requires=[ 'ztm.topicmaps'
                       , 'zope.interface'
                       , 'zope.component'
                       , 'setuptools'
                       ],
      entry_points = ""
      )

