import io
import logging

from setuptools import setup, find_packages

logger = logging.getLogger(__name__)

try:
    with io.open('README.md', encoding='utf-8') as f:
        long_description = f.read()
except FileNotFoundError:
    long_description = ''


def do_setup():
    setup(
        name="{{cookiecutter.project_slug}}",
        packages=find_packages(exclude=['tests', 'tests.*', 'home']),
        version_config=True,
        setup_requires=['setuptools-git-versioning'],
        install_requires=[
            'begins',
        ],
        scripts=['{{cookiecutter.project_slug}}/bin/{{cookiecutter.project_slug}}'],
        zip_safe=False,
        author="{{cookiecutter.author}}",
        description="{{cookiecutter.description}}",
        long_description=long_description,
        license='MIT License',
    )


if __name__ == "__main__":
    do_setup()
