#!/usr/bin/env python3
import os
import json
from os.path import join, dirname, abspath
from setuptools import setup, find_packages

PROJ_NAME = 'sumoq'
PACKAGE_NAME = 'sumoq'

PROJ_METADATA = '%s.json' % PROJ_NAME

here = abspath(dirname(__file__))
with open(join(here, 'VERSION')) as VERSION_FILE:
    __versionstr__ = VERSION_FILE.read().strip()

here = os.path.abspath(os.path.dirname(__file__))
proj_info = json.loads(open(os.path.join(here, PROJ_METADATA),
                            encoding='utf-8').read())

try:
    README = open(os.path.join(here, 'README.rst'), encoding='utf-8').read()
except:
    README = ""
CHANGELOG = open(os.path.join(here, 'CHANGELOG.rst'), encoding='utf-8').read()


setup(
    name = proj_info['name'],
    version = __versionstr__,

    author = proj_info['author'],
    author_email = proj_info['author_email'],
    url = proj_info['url'],
    license = proj_info['license'],

    description = proj_info['description'],
    keywords = proj_info['keywords'],

    long_description = README,

    packages = find_packages('src'),
    package_dir = {'' : 'src'},

    test_suite = 'tests',

    platforms = 'any',
    zip_safe = True,
    include_package_data = True,

    classifiers = proj_info['classifiers'],

    entry_points = {'console_scripts': proj_info['console_scripts']},
    install_requires =[
        "sumologic-sdk>=0.1.11"
        ]
)

