<commit_before>import os.path
try:
    from setuptools import setup
except ImportError:
    from distutils.core import setup

from plastic.version import VERSION


def readme():
    try:
        with open(os.path.join(os.path.dirname(__file__), 'README.rst')) as f:
            return f.read()
    except (IOError, OSError):
        return ''


setup(
    name='Plastic',
    packages=['plastic', 'plastictests'],
    version=VERSION,
    description='Web framework built on top of Werkzeug',
    long_description=readme(),
    license='MIT License',
    author='<NAME>',
    author_email='minhee' '@' '<EMAIL>',
    maintainer='<NAME>',
    maintainer_email='minhee' '@' 'da<EMAIL>',
    url='https://github.com/dahlia/plastic',
    install_requires=['Werkzeug >= 0.8', 'distribute'],
    tests_require=['Attest'],
    test_loader='attest:auto_reporter.test_loader',
    test_suite='plastictests.tests',
    extras_require={'docs': ['Sphinx >= 1.1']},
    classifiers=[
        'Development Status :: 3 - Alpha',
        'Environment :: Web Environment',<commit_msg>Preprocessor for README.rst<commit_after>import os.path
import re
try:
    from setuptools import setup
except ImportError:
    from distutils.core import setup

from plastic.version import VERSION


def readme():
    try:
        with open(os.path.join(os.path.dirname(__file__), 'README.rst')) as f:
            readme = f.read()
    except IOError:
        pass
    pattern = re.compile(r'''
        (?P<colon> : \n{2,})?
        \s* \.\. [ ] code-block:: \s+ [^\n]+ \n
        [ \t]* \n
        (?P<block>
            (?: (?: (?: \t | [ ]{3}) [^\n]* | [ \t]* ) \n)+
        )
    ''', re.VERBOSE)
    return pattern.sub(
        lambda m: (':' + m.group('colon') if m.group('colon') else ' ::') +
                  '\n\n' +
                  '\n'.join(' ' + l for l in m.group('block').splitlines()) +
                  '\n\n',
        readme, 0
    )


setup(
    name='Plastic',
    packages=['plastic', 'plastictests'],
    version=VERSION,
    description='Web framework built on top of Werkzeug',
    long_description=readme(),
    license='MIT License',
    author='<NAME>',
    author_email='minhee' '@' 'da<EMAIL>',
    maintainer='<NAME>',
    maintainer_email='minhee' '@' 'da<EMAIL>',
    url='https://github.com/dahlia/plastic',
    install_requires=['Werkzeug >= 0.8', 'distribute'],
    tests_require=['Attest'],
    test_loader='attest:auto_reporter.test_loader',
    test_suite='plastictests.tests',
    extras_require={'docs': ['Sphinx >= 1.1']},
    classifiers=[
        'Development Status :: 3 - Alpha',
        'Environment :: Web Environment',
{'fraction_non_alphanumeric': 0.17481987106560484, 'fraction_numerical': 0.004929844520288207, 'mean_word_length': 2.8121387283236996, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 17, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1704361', 'n_tokens_mistral': 894, 'n_tokens_neox': 873, 'n_words': 178}