try:
    from setuptools import setup
except ImportError:
    from distutils.core import setup

import sys
import shutil
exec(open('martas/version.py').read())
shutil.copyfile('martas/acquisition.py','scripts/acquisition')
shutil.copyfile('martas/collector.py','scripts/collector')
shutil.copyfile('martas/martas_init.py', 'scripts/martas_init')
shutil.copyfile('martas/web/martas_view.py', 'scripts/martas_view')
shutil.copyfile('martas/web/martas_view.py', 'scripts/marcos_view')

# modules:
# paramiko : file_upload

install_requires=[
            "geomagpy > 1.1.9",
            "numpy >= 1.21.0",
            "scipy >= 1.7.1",
            "pexpect",
            "paramiko",
            "pyserial",
            "requests",
            "python-crontab",
            "twisted",
            "plotly",
            "dash",
            "dash_daq",
            "dash-bootstrap-components",
            "psutil",
            "setuptools >= 61.0.0"
          ]

setup(
    name='martas',
    version=__version__,
    author='R. Leonhardt, R. Bailey, R. Mandl, V. Haberle',
    author_email='roman.leonhardt@geosphere.at',
    packages=['martas', 'martas.app', 'martas.conf', 'martas.core', 'martas.doc', 'martas.init', 'martas.lib', 'martas.logrotate', 'martas.scripts','martas.web', 'martas.web.assets', 'martas.web.pages'],
    scripts=['scripts/collector','scripts/acquisition', 'scripts/martas_init', 'scripts/martas_view', 'scripts/marcos_view'],
    url='',
    license='LICENSE.txt',
    description='MARTAS',
    long_description=open('README.md').read(),
    long_description_content_type='text/markdown',
    package_data={'martas': ['conf/*.cfg', 'conf/*.json', 'doc/*.png', 'doc/*.pdf', 'doc/*.md', 'init/*.sh', 'init/*.json', 'install/*.sh', 'logrotate/*.logrotate', 'scripts/*.sh', 'web/*.js', 'web/*.html', 'web/*.py', 'web/assets/*', 'web/pages/*']  },
    install_requires=install_requires,
)
