<commit_before>import sys
import os
import codecs

from setuptools import setup
from setuptools.command.test import test as TestCommand

from pypuppetdb import __version__

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


class PyTest(TestCommand):

    def finalize_options(self):
        TestCommand.finalize_options(self)
        self.test_args = ['-pep8 -m unit', ]
        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('README.rst') as f:
    README = f.read()

with codecs.open('CHANGELOG.rst') as f:
    CHANGELOG = f.read()

packages = [
    'pypuppetdb',
    'pypuppetdb.api',
    'tests',
    ]

test_requires = [
    'pytest',
    'pytest-pep8',
    'httpretty',
    'pytest-httpretty',
]

setup(
    name='pypuppetdb',
    version=__version__,
    author='<NAME>',
    author_email='<EMAIL>',
    packages=packages,
    url='https://github.com/nedap/pypuppetdb',
    license=open('LICENSE').read(),
    description='Library for working with the PuppetDB REST API.',
    long_description=README + '\n' + CHANGELOG,
    package_data={'': ['LICENSE', 'CHANGELOG.rst', ], },
    include_package_data=True,
    keywords='puppet puppetdb',
    tests_require=test_requires,
    cmdclass={'test': PyTest},
    install_requires=[
        "requests >= 1.2.3",
        "pytz == 2013b",
        ],
    classifiers=[
        'Development Status :: 3 - Alpha',
        'Intended Audience :: Developers',
        'Natural Language :: English',
        'License :: OSI Approved :: Apache Software License',
        'Operating System :: POSIX',
        'Programming Language :: Python :: 2',
        'Programming Language :: Python :: 2.6',
        'Programming Language :: Python :: 2.7',
        'Topic :: Software Development :: Libraries'
        ],
    )
<commit_msg>setup: Fix unicode handling, add Python 3.3<commit_after>import sys
import os
import codecs

from setuptools import setup
from setuptools.command.test import test as TestCommand

from pypuppetdb import __version__

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


class PyTest(TestCommand):

    def finalize_options(self):
        TestCommand.finalize_options(self)
        self.test_args = ['-pep8 -m unit', ]
        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('README.rst', encoding='utf-8') as f:
    README = f.read()

with codecs.open('CHANGELOG.rst', encoding='utf-8') as f:
    CHANGELOG = f.read()

packages = [
    'pypuppetdb',
    'pypuppetdb.api',
    'tests',
    ]

test_requires = [
    'pytest',
    'pytest-pep8',
    'httpretty',
    'pytest-httpretty',
]

setup(
    name='pypuppetdb',
    version=__version__,
    author='<NAME>',
    author_email='<EMAIL>',
    packages=packages,
    url='https://github.com/nedap/pypuppetdb',
    license=open('LICENSE').read(),
    description='Library for working with the PuppetDB REST API.',
    long_description=README + u'\n' + CHANGELOG,
    package_data={'': ['LICENSE', 'CHANGELOG.rst', ], },
    include_package_data=True,
    keywords='puppet puppetdb',
    tests_require=test_requires,
    cmdclass={'test': PyTest},
    install_requires=[
        "requests >= 1.2.3",
        "pytz == 2013b",
        ],
    classifiers=[
        'Development Status :: 3 - Alpha',
        'Intended Audience :: Developers',
        'Natural Language :: English',
        'License :: OSI Approved :: Apache Software License',
        'Operating System :: POSIX',
        'Programming Language :: Python :: 2',
        'Programming Language :: Python :: 2.6',
        'Programming Language :: Python :: 2.7',
        'Programming Language :: Python :: 3',
        'Programming Language :: Python :: 3.3',
        'Topic :: Software Development :: Libraries'
        ],
    )

{'fraction_non_alphanumeric': 0.13818181818181818, 'fraction_numerical': 0.009454545454545455, 'mean_word_length': 2.8524743230625584, 'pattern_counts': {'":': 0, '<': 7, '<?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': 6, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6007899', 'n_tokens_mistral': 1360, 'n_tokens_neox': 1327, 'n_words': 304}