import os
from setuptools import setup, find_packages

try:
    with open('requirements.txt') as f:
        requirements = f.read().splitlines()
except FileNotFoundError:
    print(os.path.abspath(os.curdir))
    print(os.listdir('.'))
    raise

setup(
    name='sovereign',
    version='0.1.2',
    python_requires='>=3.6.0',
    packages=find_packages('src'),
    package_dir={'': 'src'},
    package_data={
        'src/sovereign': ['docs/*', ]
    },
    zip_safe=False,
    include_package_data=True,
    url='https://bitbucket.org/vsyrakis/sovereign',
    license='Apache-2.0',
    author='Vassilios Syrakis',
    author_email='vsyrakis@atlassian.com',
    description='Envoy Proxy control-plane written in Python',
    entry_points={
        "sovereign.sources": [
            "service_broker = sovereign.sources.service_broker:ServiceBroker",
            "file = sovereign.sources.file:File",
            "inline = sovereign.sources.inline:Inline",
        ],
        # "sovereign.modifiers": [
        #     "micros = sovereign.modifiers.micros:Micros",
        # ],
        # "sovereign.global_modifiers": [
        #     "merge_by_domain = sovereign.modifiers.micros:MergeByDomain"
        # ]
    },
    install_requires=requirements,
)
