Skip to content

Instantly share code, notes, and snippets.

@aubricus
Created February 24, 2014 08:48

Revisions

  1. aubricus revised this gist Feb 24, 2014. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion setup_snippet.py
    Original file line number Diff line number Diff line change
    @@ -26,5 +26,5 @@

    # other params omitted for berevity
    setup(
    long_description=long_description
    long_description=long_description
    )
  2. aubricus created this gist Feb 24, 2014.
    30 changes: 30 additions & 0 deletions setup_snippet.py
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,30 @@
    long_description = ''

    try:
    import subprocess
    import pandoc

    process = subprocess.Popen(
    ['which pandoc'],
    shell=True,
    stdout=subprocess.PIPE,
    universal_newlines=True
    )

    pandoc_path = process.communicate()[0]
    pandoc_path = pandoc_path.strip('\n')

    pandoc.core.PANDOC_PATH = pandoc_path

    doc = pandoc.Document()
    doc.markdown = open('README.md').read()

    long_description = doc.rst

    except:
    pass

    # other params omitted for berevity
    setup(
    long_description=long_description
    )