<commit_before>#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
pook
====
Versatile HTTP traffic mocking and expectations made easy in Python.

:copyright: (c) 2016 <NAME>
:license: MIT
"""

import os
import sys
import codecs
from setuptools import setup, find_packages
from setuptools.command.test import test as TestCommand

# Publish command
if sys.argv[-1] == 'publish':
    os.system('python setup.py sdist upload')
    sys.exit()


setup_requires = []
if 'test' in sys.argv:
    setup_requires.append('pytest')


def read_version(package):
    init_path = os.path.join(package, '__init__.py')
    with open(init_path, 'r') as fd:
        for line in fd:
            if line.startswith('__version__ = '):
                return line.split()[-1].strip().strip("'")


# Get package current version
version = read_version('pook')


class PyTest(TestCommand):
    def finalize_options(self):
        TestCommand.finalize_options(self)
        self.test_args = ['tests/']
        self.test_suite = True

    def run_tests(self):
        # import here, cause outside the eggs aren't loaded
        import pytest
        errno = pytest.main(self.test_args)
        sys.exit(errno)


with codecs.open('requirements-dev.txt', encoding='utf-8') as f:
    tests_require = f.read().splitlines()
with codecs.open('requirements.txt', encoding='utf-8') as f:
    install_requires = f.read().splitlines()
with codecs.open('README.rst', encoding='utf-8') as f:
    readme = f.read()
with codecs.open('History.rst', encoding='utf-8') as f:
    history = f.read()


setup(
    name='pook',
    version=version,
    author='<NAME>',
    author_email='<EMAIL>',
    description=(
        'HTTP traffic mocking and expectations made easy'
    ),
    url='https://github.com/h2non/pook',
    license='MIT',
    long_description=readme + '\n\n' + history,
    py_modules=['pook'],
    zip_safe=False,
    install_requires=install_requires,
    extras_require={
        ':python_version < "3.3"': [
            'mock~=2.0.0',
        ],
    },
    tests_require=tests_require,
    packages=find_packages(exclude=['tests', 'examples', 'docs']),
    package_data={'': [
        'LICENSE', 'README.rst', 'History.rst',
        'requirements.txt', 'requirements-dev.txt'
    ]},
    package_dir={'pook': 'pook'},
    include_package_data=True,
    cmdclass={'test': PyTest},
    classifiers=[
        'Intended Audience :: Developers',
        'Intended Audience :: System Administrators',
        'Operating System :: OS Independent',
        'Development Status :: 5 - Production/Stable',
        'Natural Language :: English',
        'License :: OSI Approved :: MIT License',
        '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',
        'Topic :: Software Development',
        'Topic :: Software Development :: Libraries :: Python Modules',
        'Programming Language :: Python :: Implementation :: CPython',
        'Programming Language :: Python :: Implementation :: PyPy'
    ],
)<commit_msg>refactor(setup): remove extra install dependency<commit_after>#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
pook
====
Versatile HTTP traffic mocking and expectations made easy in Python.

:copyright: (c) 2016-2017 <NAME>
:license: MIT
"""

import os
import sys
import codecs
from setuptools import setup, find_packages
from setuptools.command.test import test as TestCommand

# Publish command
if sys.argv[-1] == 'publish':
    os.system('python setup.py sdist upload')
    sys.exit()


setup_requires = []
if 'test' in sys.argv:
    setup_requires.append('pytest')


def read_version(package):
    init_path = os.path.join(package, '__init__.py')
    with open(init_path, 'r') as fd:
        for line in fd:
            if line.startswith('__version__ = '):
                return line.split()[-1].strip().strip("'")


# Get package current version
version = read_version('pook')


class PyTest(TestCommand):
    def finalize_options(self):
        TestCommand.finalize_options(self)
        self.test_args = ['tests/']
        self.test_suite = True

    def run_tests(self):
        # import here, cause outside the eggs aren't loaded
        import pytest
        errno = pytest.main(self.test_args)
        sys.exit(errno)


with codecs.open('requirements-dev.txt', encoding='utf-8') as f:
    tests_require = f.read().splitlines()
with codecs.open('requirements.txt', encoding='utf-8') as f:
    install_requires = f.read().splitlines()
with codecs.open('README.rst', encoding='utf-8') as f:
    readme = f.read()
with codecs.open('History.rst', encoding='utf-8') as f:
    history = f.read()


setup(
    name='pook',
    version=version,
    author='<NAME>',
    author_email='<EMAIL>',
    description=(
        'HTTP traffic mocking and expectations made easy'
    ),
    url='https://github.com/h2non/pook',
    license='MIT',
    long_description=readme + '\n\n' + history,
    py_modules=['pook'],
    zip_safe=False,
    install_requires=install_requires,
    tests_require=tests_require,
    packages=find_packages(exclude=['tests', 'examples', 'docs']),
    package_data={'': [
        'LICENSE', 'README.rst', 'History.rst',
        'requirements.txt', 'requirements-dev.txt'
    ]},
    package_dir={'pook': 'pook'},
    include_package_data=True,
    cmdclass={'test': PyTest},
    classifiers=[
        'Intended Audience :: Developers',
        'Intended Audience :: System Administrators',
        'Operating System :: OS Independent',
        'Development Status :: 5 - Production/Stable',
        'Natural Language :: English',
        'License :: OSI Approved :: MIT License',
        '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',
        'Topic :: Software Development',
        'Topic :: Software Development :: Libraries :: Python Modules',
        'Programming Language :: Python :: Implementation :: CPython',
        'Programming Language :: Python :: Implementation :: PyPy'
    ],
)
{'fraction_non_alphanumeric': 0.14740473576917046, 'fraction_numerical': 0.008938372275364592, 'mean_word_length': 3.1016077170418006, 'pattern_counts': {'":': 0, '<': 10, '<?xml version=': 0, '>': 9, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 8, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2286622', 'n_tokens_mistral': 1992, 'n_tokens_neox': 1919, 'n_words': 474}