Permalink
Browse files

fixed RuntimeError in setup.py caused by pandoc on non-amd64 arches (#…

…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...
1 parent 8b30700 commit b584ca349a032ab53d57de29f209bbbdfcd859ca @WGH- WGH- committed with zachriggle Dec 29, 2016
Showing with 4 additions and 0 deletions.
  1. +4 −0 setup.py
View
@@ -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
@@ -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(

0 comments on commit b584ca3

Please sign in to comment.