<commit_before>import setuptools 
import os.path
import subprocess

# Build README.txt from README.md if not present
if not os.path.exists('README.txt'):
    subprocess.call(['pandoc', '--to=rst', '--smart', '--output=README.txt', 'README.md'])

setuptools.setup(
    name='jsonpath-rw',
    version='0.3',
    description='A robust and extended implementation of JSONPath with read and update capability, and a clear AST',
    author='<NAME>',
    author_email='<EMAIL>',
    url='https://github.com/kennknowles/python-jsonpath-rw',
    license='Apache 2.0',
    long_description=open('README.txt').read(),
    packages = ['jsonpath_rw'],
    test_suite = 'tests',
    install_requires = [ 'ply', 'decorator', 'six' ],
)<commit_msg>Patch up setup for (degraded) building without pandoc around<commit_after>import setuptools 
import sys
import os.path
import subprocess


# Build README.txt from README.md if not present, and if we are actually building for distribution to pypi
if not os.path.exists('README.txt') and 'sdist' in sys.argv:
    subprocess.call(['pandoc', '--to=rst', '--smart', '--output=README.txt', 'README.md'])

# But use the best README around
readme = 'README.txt' if os.path.exists('README.txt') else 'README.md'

setuptools.setup(
    name='jsonpath-rw',
    version='0.3',
    description='A robust and extended implementation of JSONPath with read and update capability, and a clear AST',
    author='<NAME>',
    author_email='<EMAIL>',
    url='https://github.com/kennknowles/python-jsonpath-rw',
    license='Apache 2.0',
    long_description=open(readme).read(),
    packages = ['jsonpath_rw'],
    test_suite = 'tests',
    install_requires = [ 'ply', 'decorator', 'six' ],
)
{'fraction_non_alphanumeric': 0.15474794841735054, 'fraction_numerical': 0.004689331770222743, 'mean_word_length': 4.268518518518518, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6007904', 'n_tokens_mistral': 563, 'n_tokens_neox': 555, 'n_words': 144}