Skip to content

Commit

Permalink
fixed RuntimeError in setup.py caused by pandoc on non-amd64 arches (#…
Browse files Browse the repository at this point in the history
…820)

If pandoc is not installed locally, pwntools' setup.py
tells pypandoc to download one.

Unfortunately, it fails on non-amd64 arches because
pypandocs provides precompiled binaries only for amd64.

Since pypandoc is not hard dependency for pwntools,
this error can be skipped without major harm.

In fact, pwntools' setup.py already handles ImportError
gracefully. The problem is, arch mismatch causes
a completely different exception.
  • Loading branch information
WGH authored and zachriggle committed Dec 29, 2016
1 parent 8b30700 commit b584ca3
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import os
import platform
import sys
import traceback
from distutils.command.install import INSTALL_SCHEMES
from distutils.sysconfig import get_python_inc
from distutils.util import convert_path
Expand Down Expand Up @@ -75,6 +76,9 @@
long_description = pypandoc.convert_file('README.md', 'rst')
except ImportError:
pass
except Exception as e:
print >>sys.stderr, "Failed to convert README.md through pandoc, proceeding anyway"
traceback.print_exc()


setup(
Expand Down

0 comments on commit b584ca3

Please sign in to comment.