import os

from setuptools import setup


def read(fname):
    with open(os.path.join(os.path.dirname(__file__), fname)) as f:
        return f.read()


# exposing the params so it can be imported
setup_params = {
    "name": "mysodexo",
    "version": "20191112",
    "description": "Mysodexo Python client",
    "long_description": read("README.md"),
    "long_description_content_type": "text/markdown",
    "author": "Andre Miras",
    "url": "https://github.com/AndreMiras/mysodexo",
    "packages": ("mysodexo",),
    "install_requires": ("requests", "appdirs"),
    "include_package_data": True,
    "entry_points": {"console_scripts": ("mysodexo=mysodexo.cli:main",)},
}


def run_setup():
    setup(**setup_params)


# makes sure the setup doesn't run at import time
if __name__ == "__main__":
    run_setup()
