#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""Install rcli and rcli distutils extensions."""

from __future__ import unicode_literals

import os.path
import shutil
import sys

from setuptools import setup
from setuptools import find_packages


if sys.argv[-1] == 'egg_info':
    if os.path.isdir('rcli.egg-info'):
        try:
            shutil.rmtree('rcli.egg-info')
        except:  # pylint: disable=bare-except
            pass

setup(
    name='rcli',
    use_scm_version=True,
    description='A library for rapidly creating command-line tools.',
    long_description=open('README.rst').read(),
    author='Dangle Nuño',
    author_email='dangle@contains.io',
    url='https://github.com/contains-io/rcli',
    keywords=['docopt', 'commands', 'subcommands', 'tooling', 'cli'],
    license='MIT',
    packages=find_packages(exclude=['tests', 'docs']),
    install_requires=[
        'typing >= 3.5.3',
        'backports.shutil_get_terminal_size',
        'colorama >= 0.3.6, < 1',
        'tqdm >= 4.9.0, < 5',
        'docopt >= 0.6.2, < 1',
        'six >= 1, < 2'
    ],
    setup_requires=[
        'typing >= 3.5.3',
        'pytest-runner',
        'setuptools_scm'
    ],
    tests_require=['pytest >= 3.0'],
    entry_points={
        'distutils.setup_keywords': [
            'autodetect_commands = rcli.autodetect:setup_keyword'
        ],
        'egg_info.writers': [
            'rcli-config.json = rcli.autodetect:egg_info_writer'
        ]
    },
    classifiers=[
        'Development Status :: 3 - Alpha',
        'License :: OSI Approved :: MIT License',
        'Operating System :: OS Independent',
        'Programming Language :: Python',
        'Programming Language :: Python :: 2',
        'Programming Language :: Python :: 2.7',
        'Programming Language :: Python :: 3',
        'Programming Language :: Python :: 3.3',
        'Programming Language :: Python :: 3.4',
        'Programming Language :: Python :: 3.5',
        'Programming Language :: Python :: 3.6',
        'Intended Audience :: Developers',
        'Topic :: Utilities'
    ]
)

#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""Install rcli and rcli distutils extensions."""

from __future__ import unicode_literals

import os.path
import shutil

from setuptools import setup
from setuptools import find_packages


if os.path.isdir('rcli.egg-info'):
    try:
        shutil.rmtree('rcli.egg-info')
    except:  # pylint: disable=bare-except
        pass

setup(
    name='rcli',
    use_scm_version=True,
    description='A library for rapidly creating command-line tools.',
    long_description=open('README.rst').read(),
    author='Dangle Nuño',
    author_email='dangle@contains.io',
    url='https://github.com/contains-io/rcli',
    keywords=['docopt', 'commands', 'subcommands', 'tooling', 'cli'],
    license='MIT',
    packages=find_packages(exclude=['tests', 'docs']),
    install_requires=[
        'typing >= 3.5.3',
        'backports.shutil_get_terminal_size',
        'colorama >= 0.3.6, < 1',
        'tqdm >= 4.9.0, < 5',
        'docopt >= 0.6.2, < 1',
        'six >= 1.10.0'
    ],
    setup_requires=[
        'six >= 1.10.0',
        'packaging',
        'appdirs',
        'pytest-runner',
        'setuptools_scm',
        'typing >= 3.5.3',
        'docopt >= 0.6.2, < 1'
    ],
    tests_require=['pytest >= 3.0'],
    entry_points={
        'distutils.setup_keywords': [
            'autodetect_commands = rcli.autodetect:setup_keyword'
        ],
        'egg_info.writers': [
            'rcli-config.json = rcli.autodetect:egg_info_writer'
        ]
    },
    classifiers=[
        'Development Status :: 3 - Alpha',
        'License :: OSI Approved :: MIT License',
        'Operating System :: OS Independent',
        'Programming Language :: Python',
        'Programming Language :: Python :: 2',
        'Programming Language :: Python :: 2.7',
        'Programming Language :: Python :: 3',
        'Programming Language :: Python :: 3.3',
        'Programming Language :: Python :: 3.4',
        'Programming Language :: Python :: 3.5',
        'Programming Language :: Python :: 3.6',
        'Intended Audience :: Developers',
        'Topic :: Utilities'
    ]
)

Add missing setup_requires to work around a setuptools 34 issue.