#!/usr/bin/env python
# -*- coding: utf-8 -*-

"""The setup script."""

from setuptools import setup, find_packages
from re import search


with open('README.rst') as readme_file:
    readme = readme_file.read()

with open('HISTORY.rst') as history_file:
    history = history_file.read()

with open('filtrark/__init__.py') as init_file:
    version = search(r"(\d+\.\d+\.\d+)", init_file.read()).group(1)
    print("==============", version)


requirements = [
    # TODO: Put package requirements here
]

setup_requirements = [
    # TODO(eecheverry): Put setup requirements (distutils extensions, etc.) here
]

test_requirements = [
    # TODO: Put package test requirements here
]

setup(
    name='filtrark',
    version=version,
    description="Build filter clauses from instruction lists",
    long_description=readme + '\n\n' + history,
    author="Esteban Echeverry",
    author_email='eecheverry@nubark.com',
    url='https://github.com/nubark/filtrark',
    packages=find_packages(include=['filtrark']),
    include_package_data=True,
    install_requires=requirements,
    license="MIT license",
    zip_safe=False,
    keywords='filtrark',
    classifiers=[
        'Development Status :: 2 - Pre-Alpha',
        'Intended Audience :: Developers',
        'License :: OSI Approved :: MIT License',
        'Natural Language :: English',
        'Programming Language :: Python :: 3',
        'Programming Language :: Python :: 3.5',
        'Programming Language :: Python :: 3.6',
    ],
    test_suite='tests',
    tests_require=test_requirements,
    setup_requires=setup_requirements,
)
