from distutils.core import setup

with open('README.md') as readme:
    with open('HISTORY.md') as history:
        long_description = readme.read() + '\n\n' + history.read()

try:
    import pypandoc

    long_description = pypandoc.convert(long_description, 'rst')
except(IOError, ImportError):
    long_description = long_description

VERSION = '1.0.1'

setup(
    name='argparse-autogen',
    py_modules=['argparse_autogen'],
    version=VERSION,
    url='https://github.com/sashgorokhov/argparse-autogen',
    download_url='https://github.com/sashgorokhov/argparse-autogen/archive/v%s.zip' % VERSION,
    keywords=['python', 'argparse', 'generate'],
    classifiers=[],
    long_description=long_description,
    license='MIT License',
    author='sashgorokhov',
    author_email='sashgorokhov@gmail.com',
    description="Parser with automatic creation of parsers and subparsers for paths.",
)

from distutils.core import setup

with open('README.md') as readme:
    with open('HISTORY.md') as history:
        long_description = readme.read() + '\n\n' + history.read()

try:
    import pypandoc

    long_description = pypandoc.convert(long_description, 'rst', 'markdown')
except(IOError, ImportError):
    long_description = long_description

VERSION = '1.0.1'

setup(
    name='argparse-autogen',
    py_modules=['argparse_autogen'],
    version=VERSION,
    url='https://github.com/sashgorokhov/argparse-autogen',
    download_url='https://github.com/sashgorokhov/argparse-autogen/archive/v%s.zip' % VERSION,
    keywords=['python', 'argparse', 'generate'],
    classifiers=[],
    long_description=long_description,
    license='MIT License',
    author='sashgorokhov',
    author_email='sashgorokhov@gmail.com',
    description="Parser with automatic creation of parsers and subparsers for paths.",
)

Convert md to rst readme specially for PyPi
Convert md to rst readme specially for PyPi

  from distutils.core import setup
  
  with open('README.md') as readme:
      with open('HISTORY.md') as history:
          long_description = readme.read() + '\n\n' + history.read()
  
  try:
      import pypandoc
  
-     long_description = pypandoc.convert(long_description, 'rst')
+     long_description = pypandoc.convert(long_description, 'rst', 'markdown')
  except(IOError, ImportError):
      long_description = long_description
  
  VERSION = '1.0.1'
  
  setup(
      name='argparse-autogen',
      py_modules=['argparse_autogen'],
      version=VERSION,
      url='https://github.com/sashgorokhov/argparse-autogen',
      download_url='https://github.com/sashgorokhov/argparse-autogen/archive/v%s.zip' % VERSION,
      keywords=['python', 'argparse', 'generate'],
      classifiers=[],
      long_description=long_description,
      license='MIT License',
      author='sashgorokhov',
      author_email='sashgorokhov@gmail.com',
      description="Parser with automatic creation of parsers and subparsers for paths.",
  )
  
Convert md to rst readme specially for PyPi
## Code Before:
from distutils.core import setup

with open('README.md') as readme:
    with open('HISTORY.md') as history:
        long_description = readme.read() + '\n\n' + history.read()

try:
    import pypandoc

    long_description = pypandoc.convert(long_description, 'rst')
except(IOError, ImportError):
    long_description = long_description

VERSION = '1.0.1'

setup(
    name='argparse-autogen',
    py_modules=['argparse_autogen'],
    version=VERSION,
    url='https://github.com/sashgorokhov/argparse-autogen',
    download_url='https://github.com/sashgorokhov/argparse-autogen/archive/v%s.zip' % VERSION,
    keywords=['python', 'argparse', 'generate'],
    classifiers=[],
    long_description=long_description,
    license='MIT License',
    author='sashgorokhov',
    author_email='sashgorokhov@gmail.com',
    description="Parser with automatic creation of parsers and subparsers for paths.",
)

## Instruction:
Convert md to rst readme specially for PyPi
## Code After:
from distutils.core import setup

with open('README.md') as readme:
    with open('HISTORY.md') as history:
        long_description = readme.read() + '\n\n' + history.read()

try:
    import pypandoc

    long_description = pypandoc.convert(long_description, 'rst', 'markdown')
except(IOError, ImportError):
    long_description = long_description

VERSION = '1.0.1'

setup(
    name='argparse-autogen',
    py_modules=['argparse_autogen'],
    version=VERSION,
    url='https://github.com/sashgorokhov/argparse-autogen',
    download_url='https://github.com/sashgorokhov/argparse-autogen/archive/v%s.zip' % VERSION,
    keywords=['python', 'argparse', 'generate'],
    classifiers=[],
    long_description=long_description,
    license='MIT License',
    author='sashgorokhov',
    author_email='sashgorokhov@gmail.com',
    description="Parser with automatic creation of parsers and subparsers for paths.",
)
