from setuptools import setup
from setuptools.command.install import install

class PostInstallCommand(install):
    user_options = install.user_options + [
        ('noservice', None, None),
    ]

    def initialize_options(self):
        install.initialize_options(self)
        self.noservice = None

    def finalize_options(self):
        install.finalize_options(self)

    def run(self):
        install.run(self)
        if not self.noservice:
            from xmediusmailrelayserver import console
            console.install_service(['--startup', 'auto', 'install'])

setup(
    name='xmediusmailrelayserver',
    version='1.0.0',
    description='The Python module to be used to relay mail to different servers depending on patterns',
    long_description='See https://github.com/xmedius/xmedius-mailrelayserver for more information',
    url='https://github.com/xmedius/xmedius-mailrelayserver/',
    author='XMedius R&D',
    license='MIT',
    classifiers=[
        'Programming Language :: Python :: 3.6',
        'Environment :: Win32 (MS Windows)',
        'Operating System :: Microsoft :: Windows'
    ],
    cmdclass={
        'install': PostInstallCommand
    },
    packages=['xmediusmailrelayserver'],
    package_data={'xmediusmailrelayserver': ['config.yml']},
    install_requires=['pyyaml', 'aiosmtpd'],
    dependency_links=[]
)


[((22, 0, 42, 1), 'setuptools.setup', 'setup', (), '', False, 'from setuptools import setup\n'), ((10, 8, 10, 40), 'setuptools.command.install.install.initialize_options', 'install.initialize_options', ({(10, 35, 10, 39): 'self'}, {}), '(self)', False, 'from setuptools.command.install import install\n'), ((14, 8, 14, 38), 'setuptools.command.install.install.finalize_options', 'install.finalize_options', ({(14, 33, 14, 37): 'self'}, {}), '(self)', False, 'from setuptools.command.install import install\n'), ((17, 8, 17, 25), 'setuptools.command.install.install.run', 'install.run', ({(17, 20, 17, 24): 'self'}, {}), '(self)', False, 'from setuptools.command.install import install\n'), ((20, 12, 20, 69), 'xmediusmailrelayserver.console.install_service', 'console.install_service', ({(20, 36, 20, 68): "['--startup', 'auto', 'install']"}, {}), "(['--startup', 'auto', 'install'])", False, 'from xmediusmailrelayserver import console\n')]