"""
A simple setup.py
=================

References
----------
https://packaging.python.org/en/latest/distributing.html
https://github.com/pypa/sampleproject
"""
import imp
import os
import setuptools
from codecs import open
from os import path

here = path.abspath(path.dirname(__file__))
metadata = imp.load_source('bluetoothautomation._metadata', os.path.join(here, 'bluetoothautomation', '_metadata.py'))


# keep the long description on one place
with open(path.join(here, 'README.md'), encoding='utf-8') as f:
    long_description = f.read()


# TODO: custom post-install to add/link console scripts to /usr/local/bin

# actually do the install
setuptools.setup(
    name='bluetoothautomation',
    version=metadata.__version__,
    description='Bluetooth Automation',
    long_description=long_description,
    url='https://stash.sd.apple.com/projects/WAF/repos/bluetoothautomation',
    author='Leanne Huang',  # TODO: OD group name after naming settles
    author_email='leanne.huang@apple.com',  # TODO: OD group email after naming settles
    classifiers=[
        #   3 - Alpha, 4 - Beta, 5 - Production/Stable
        'Development Status :: 3 - Alpha',
        'Intended Audience :: QA Automation',
        'Programming Language :: Python :: 2',
        'Programming Language :: Python :: 2.7',
        'Programming Language :: Python :: 3',
        'Programming Language :: Python :: 3.7',
    ],
    keywords='ATK bluetooth bam automation',
    license='Apple Internal. Copyright (c) 2019, all rights reserved.',
    platforms=['macosx-10.12-intel', 'macosx-10.13-intel', 'macosx-10.14-intel'],
    packages=setuptools.find_packages(exclude=['docs', 'tests']),
    entry_points={
        'console_scripts': [
            'bam=bluetoothautomation._cli:bam',
        ],
    },
    install_requires=[
        'click',
        ],
    extras_require={
        'dev': [
            'twine',
            ],
    },
    package_data={},
    include_package_data=True,
    data_files=[],
    project_urls={
        # # TODO:  Update radar components and project_urls after name settles
        # 'Bug Reports': '<rdar://component/983844> WTE Libs | Libraries',
        # 'New Problem': 'rdar://new/problem/componentid=983844',
        # 'Source': 'https://stash.sd.apple.com/projects/WAF/repos/bluetoothautomation',
    },
)
