#!/usr/bin/env python

import chevron.metadata

try:
    from setuptools import setup
except ImportError:
    from distutils.core import setup

try:
    import pypandoc
    readme = pypandoc.convert('README.md', 'rest')
except (ImportError, RuntimeError):
    print('\n\n!!!\npypandoc not loaded\n!!!\n')
    readme = ''



setup(name='chevron',
      version=chevron.metadata.version,
      license='MIT',

      description='Mustache templating language renderer',
      long_description=readme,

      author='noah morrison',
      author_email='noah@morrison.ph',
      url='https://github.com/noahmorrison/chevron',

      packages=['chevron'],
      entry_points={
          'console_scripts': ['chevron=chevron:cli_main']
      },

      classifiers=[
          'Development Status :: 4 - Beta',

          'License :: OSI Approved :: MIT License',

          'Programming Language :: Python :: 2.6',
          'Programming Language :: Python :: 2.7',
          'Programming Language :: Python :: 3.2',
          'Programming Language :: Python :: 3.3',
          'Programming Language :: Python :: 3.4',
          'Programming Language :: Python :: 3.5',
          'Programming Language :: Python :: 3.6',
          'Topic :: Text Processing :: Markup'
      ]
      )

@@ -141,186 +141,59 @@
 up%0A%0A
-try:%0A    import pypandoc%0A    readme = pypandoc.convert('README.md', 'rest')%0Aexcept (ImportError, RuntimeError):%0A    print('%5Cn%5Cn!!!%5Cnpypandoc not loaded%5Cn!!!%5Cn')%0A    readme = ''%0A%0A
+%0Awith open('README.md') as f:%0A    readme = f.read()
 %0A%0Ase

Remove pandoc, PyPi accepts markdown now