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

from __future__ import absolute_import, print_function

import io
import re

from glob import glob
from os.path import basename, dirname, join, splitext

# ThirdParty Library Imports
from setuptools import find_packages, setup


def read(*names, **kwargs):
    with io.open(
        join(dirname(__file__), *names), encoding=kwargs.get("encoding", "utf8")
    ) as fh:
        return fh.read()


testing_requires = [
    "mock>=4.0.3",
    "pytest-bdd>=5.0.0",
    "pytest-cov>=3.0.0",
    "pytest-mock>=3.7.0",
    "pytest>=7.0.1",
]

dev_requires = testing_requires + [
    "bump2version>=1.0.1",
]

setup(
    name="{{ package_name|replace('_','-') }}",
    version="0.1.0",
    description="{{ short_description }}",
    long_description="{{ short_description }}",
    packages=find_packages("src"),
    package_dir={"": "src"},
    py_modules=[splitext(basename(path))[0] for path in glob("src/*.py")],
    include_package_data=True,
    zip_safe=False,
    classifiers=[
        "Programming Language :: Python",
        "Programming Language :: Python :: 3.7",
        "Programming Language :: Python :: 3.8",
        "Programming Language :: Python :: 3.9",
        "Programming Language :: Python :: 3.10",
        "Programming Language :: Python :: 3 :: Only",
    ],
    keywords=[
        # eg: 'keyword1', 'keyword2', 'keyword3',
    ],
    python_requires=">=3.7",
    install_requires=[
        "protean[message_db, {{ database }}]>=0.10.0",
    ],
    extras_require={
        "test": testing_requires,
        "tests": testing_requires,
        "testing": testing_requires,
        "dev": dev_requires,
        "all": dev_requires,
    },
)
