fixed RuntimeError in setup.py caused by pandoc on non-amd64 arches#820
fixed RuntimeError in setup.py caused by pandoc on non-amd64 arches#820zachriggle merged 1 commit intoGallopsled:devfrom
Conversation
|
So you're running a 32-bit Python interpreter on a 64-bit OS? |
setup.py
Outdated
There was a problem hiding this comment.
Change this to handle all exceptions ("Exception as e") and simply print it out and continue.
|
Actually, I encountered this problem on 32 bit ARM. But it will manifest on any 32 bit machine, obviously. |
|
Then how did you install a 64-bit pandoc? I'm confused.
…On Sun, Dec 18, 2016 at 7:12 PM WGH ***@***.***> wrote:
Actually, I encountered this problem on 32 bit ARM. But it will manifest
on any 32 machine, obviously.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#820 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAG0GL-94BWHtQUHlbLWNr1WHZRsAqotks5rJcvbgaJpZM4LQPJt>
.
|
|
In any case, *neither* Intel i386 nor ARM of any variety are supported as
hosts for Pwntools.
Only amd64 is supported. I'll merge this into dev since it's a small fix,
but be aware that anything that does work is a happy accident.
…On Sun, Dec 18, 2016 at 11:10 PM Zach Riggle ***@***.***> wrote:
Then how did you install a 64-bit pandoc? I'm confused.
On Sun, Dec 18, 2016 at 7:12 PM WGH ***@***.***> wrote:
Actually, I encountered this problem on 32 bit ARM. But it will manifest
on any 32 machine, obviously.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#820 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAG0GL-94BWHtQUHlbLWNr1WHZRsAqotks5rJcvbgaJpZM4LQPJt>
.
|
I never did. The message printed by pypandoc is somewhat misleading. pypandoc has hardcoded binary packages only for amd64. It (erroneously) assumes only i386 and amd64 ever exist, so instead of actually checking the arch, it checks arch word size. Since arm arch happens to be 32 bit one, the check fails. https://github.com/bebraw/pypandoc/blob/master/pypandoc/pandoc_download.py#L139 I guess if you would try to call |
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.
451b283 to
0324ad5
Compare
|
So I changed PR to catch all exceptions instead. Please check. |
|
This sounds like a PyPandoc issue, not a Pwntools issue. Please report this issue to PyPandoc and link to the issue here. |
|
In a way, it's indeed a pypandoc issue. I'll make an issue there. However, the only way for them to fix it is to raise proper exception (or make binaries for all possible platforms, which sounds unlikely) instead of the one with misleading message. From the pwntools' perspective, nothing will change much, and this PR will still be ok. |
|
Yep! I just want to be able to cross-reference their issue |
* Added installation configuration for Gentoo * Added check for sudo command
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.