# Copyright (c) 2020 Ian C. Good
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in
# all copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
# THE SOFTWARE.
#

from setuptools import setup, find_packages  # type: ignore

with open('README.md') as f:
    readme = f.read()

with open('LICENSE.md') as f:
    license = f.read()

setup(name='pymap',
      version='0.20.1',
      author='Ian Good',
      author_email='ian@icgood.net',
      description='Lightweight, asynchronous IMAP serving in Python.',
      long_description=readme + license,
      long_description_content_type='text/markdown',
      license='MIT',
      url='https://github.com/icgood/pymap/',
      classifiers=[
          'Development Status :: 3 - Alpha',
          'Topic :: Communications :: Email :: Post-Office',
          'Topic :: Communications :: Email :: Post-Office :: IMAP',
          'Intended Audience :: Developers',
          'Intended Audience :: Information Technology',
          'License :: OSI Approved :: MIT License',
          'Programming Language :: Python',
          'Programming Language :: Python :: 3.8'],
      python_requires='~=3.8',
      include_package_data=True,
      packages=find_packages(),
      install_requires=[
          'pysasl >= 0.6.1',
          'proxy-protocol >= 0.5.0',
          'typing-extensions'],
      extras_require={
          'redis': ['aioredis >= 1.3.0', 'msgpack >= 1.0'],
          'admin': ['pymap-admin == 0.4.2'],
          'sieve': ['sievelib'],
          'systemd': ['systemd-python'],
          'optional': ['hiredis', 'passlib', 'pid']},
      entry_points={
          'console_scripts': [
              'pymap = pymap.main:main'],
          'pymap.backend': [
              'dict = pymap.backend.dict:DictBackend',
              'maildir = pymap.backend.maildir:MaildirBackend',
              'redis = pymap.backend.redis:RedisBackend [redis]'],
          'pymap.service': [
              'imap = pymap.imap:IMAPService',
              'admin = pymap.admin:AdminService [admin]',
              'managesieve = pymap.sieve.manage:ManageSieveService [sieve]'],
          'pymap.filter': [
              'sieve = pymap.sieve:SieveCompiler [sieve]'],
          'pymap.admin.handlers': [
              'server = pymap.admin.handlers.system:SystemHandlers',
              'mailbox = pymap.admin.handlers.mailbox:MailboxHandlers',
              'user = pymap.admin.handlers.user:UserHandlers']})
