New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Throw Error on Python3 Installation #1092

Closed
zachriggle opened this Issue Jan 4, 2018 · 1 comment

Comments

Projects
None yet
2 participants
@zachriggle
Contributor

zachriggle commented Jan 4, 2018

Apparently Pwntools' setup.py script is well-formed Python3, to the point that you can actually install it.

We should prevent this, since the successfully-installed-Pwntools-on-Python3 doesn't actually work.

$ python3 --version
Python 3.6.3
$ pip3 --version
pip 9.0.1 from /home/riggle/.pyenv/versions/3.6.3/lib/python3.6/site-packages (python 3.6)
$ pip3 install -q -U pip pwntools
$ python3 -c 'import pwnlib'
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/home/riggle/.pyenv/versions/3.6.3/lib/python3.6/site-packages/pwnlib/__init__.py", line 43, in <module>
    importlib.import_module('.%s' % module, 'pwnlib')
  File "/home/riggle/.pyenv/versions/3.6.3/lib/python3.6/importlib/__init__.py", line 126, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "/home/riggle/.pyenv/versions/3.6.3/lib/python3.6/site-packages/pwnlib/args.py", line 61, in <module>
    from pwnlib import term
  File "/home/riggle/.pyenv/versions/3.6.3/lib/python3.6/site-packages/pwnlib/term/__init__.py", line 5, in <module>
    from pwnlib.term import completer
  File "/home/riggle/.pyenv/versions/3.6.3/lib/python3.6/site-packages/pwnlib/term/completer.py", line 6, in <module>
    from pwnlib.term import readline
  File "/home/riggle/.pyenv/versions/3.6.3/lib/python3.6/site-packages/pwnlib/term/readline.py", line 7, in <module>
    from pwnlib.term import term
  File "/home/riggle/.pyenv/versions/3.6.3/lib/python3.6/site-packages/pwnlib/term/term.py", line 167
    def goto((r, c)):
             ^
SyntaxError: invalid syntax

See bkerler/exploit_me#1 for more information

@zachriggle zachriggle added this to the Someday milestone Jan 4, 2018

zachriggle added a commit to zachriggle/pwntools that referenced this issue Jan 4, 2018

Prevent Python3 installation via "pip3 install pwntools"
Pwntools does not work on Python3, so that it installs successfully is misleading.

More information on 'python_requires' can be found here:

    https://packaging.python.org/tutorials/distributing-packages/#python-requires

Specifically, it requires pip 9.0 or better -- but this is the 'official' way to do this.

Fixes Gallopsled#1092

zachriggle added a commit that referenced this issue Jan 4, 2018

Prevent Python3 installation via "pip3 install pwntools" (#1093)
Pwntools does not work on Python3, so that it installs successfully is misleading.

More information on 'python_requires' can be found here:

    https://packaging.python.org/tutorials/distributing-packages/#python-requires

Specifically, it requires pip 9.0 or better -- but this is the 'official' way to do this.

Fixes #1092
@jsr03126

This comment has been minimized.

Show comment
Hide comment
@jsr03126

jsr03126 Mar 29, 2018

thanks for your kind post.

jsr03126 commented Mar 29, 2018

thanks for your kind post.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment