Skip to content
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

rsa 4.1.0 failed on PyPy 6.0.0 #147

Closed
yankos opened this issue Jun 11, 2020 · 1 comment
Closed

rsa 4.1.0 failed on PyPy 6.0.0 #147

yankos opened this issue Jun 11, 2020 · 1 comment

Comments

@yankos
Copy link

@yankos yankos commented Jun 11, 2020

I can't install rsa 4.1.0 with pypy 6.0.0. Looks like "pysha3" module is unsupported at the moment and it brakes the installation.
Version 4.0.0 works fine.

How to reproduce:

$ wget https://bitbucket.org/pypy/pypy/downloads/pypy3-v6.0.0-linux64.tar.bz2
$ tar jxf pypy3-v6.0.0-linux64.tar.bz2
$ mkdir ./venv_pypy
$ virtualenv -p ./pypy3-v6.0.0-linux64/bin/pypy3 ./venv_pypy
$ source ./venv_pypy/bin/activate
$ pip install rsa==4.1
Collecting rsa==4.1
  Using cached rsa-4.1-py3-none-any.whl (32 kB)
Requirement already satisfied: pyasn1>=0.1.3 in ./venv_pypy/site-packages (from rsa==4.1) (0.4.8)
Collecting pysha3<2.0,>=1.0; python_version >= "3.5" and python_version < "3.6"
  Using cached pysha3-1.0.2.tar.gz (829 kB)
Building wheels for collected packages: pysha3
  Building wheel for pysha3 (setup.py) ... error
  ERROR: Command errored out with exit status 1:
   command: /home/develop/venv_pypy/bin/pypy3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-9q7018wt/pysha3/setup.py'"'"'; __file__='"'"'/tmp/pip-install-9q7018wt/pysha3/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d /tmp/pip-wheel-fza3daue
       cwd: /tmp/pip-install-9q7018wt/pysha3/
  Complete output (16 lines):
  running bdist_wheel
  running build
  running build_py
  creating build
  creating build/lib.linux-x86_64-3.5
  copying sha3.py -> build/lib.linux-x86_64-3.5
  running build_ext
  building '_pysha3' extension
  creating build/temp.linux-x86_64-3.5
  creating build/temp.linux-x86_64-3.5/Modules
  creating build/temp.linux-x86_64-3.5/Modules/_sha3
  cc -pthread -DNDEBUG -O2 -fPIC -DPY_WITH_KECCAK=1 -I/home/develop/venv_pypy/pypy3-v6.0.0-linux64/include -c Modules/_sha3/sha3module.c -o build/temp.linux-x86_64-3.5/Modules/_sha3/sha3module.o
  In file included from Modules/_sha3/sha3module.c:20:0:
  Modules/_sha3/backport.inc:78:22: fatal error: pystrhex.h: No such file or directory
  compilation terminated.
  error: command 'cc' failed with exit status 1
  ----------------------------------------
  ERROR: Failed building wheel for pysha3
  Running setup.py clean for pysha3
Failed to build pysha3
Installing collected packages: pysha3, rsa
    Running setup.py install for pysha3 ... error
    ERROR: Command errored out with exit status 1:
     command: /home/develop/venv_pypy/bin/pypy3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-9q7018wt/pysha3/setup.py'"'"'; __file__='"'"'/tmp/pip-install-9q7018wt/pysha3/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /tmp/pip-record-pjjhc4qx/install-record.txt --single-version-externally-managed --compile --install-headers /home/develop/venv_pypy/include/site/python3.5/pysha3
         cwd: /tmp/pip-install-9q7018wt/pysha3/
    Complete output (16 lines):
    running install
    running build
    running build_py
    creating build
    creating build/lib.linux-x86_64-3.5
    copying sha3.py -> build/lib.linux-x86_64-3.5
    running build_ext
    building '_pysha3' extension
    creating build/temp.linux-x86_64-3.5
    creating build/temp.linux-x86_64-3.5/Modules
    creating build/temp.linux-x86_64-3.5/Modules/_sha3
    cc -pthread -DNDEBUG -O2 -fPIC -DPY_WITH_KECCAK=1 -I/home/develop/venv_pypy/pypy3-v6.0.0-linux64/include -c Modules/_sha3/sha3module.c -o build/temp.linux-x86_64-3.5/Modules/_sha3/sha3module.o
    In file included from Modules/_sha3/sha3module.c:20:0:
    Modules/_sha3/backport.inc:78:22: fatal error: pystrhex.h: No such file or directory
    compilation terminated.
    error: command 'cc' failed with exit status 1
    ----------------------------------------
ERROR: Command errored out with exit status 1: /home/develop/venv_pypy/bin/pypy3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-9q7018wt/pysha3/setup.py'"'"'; __file__='"'"'/tmp/pip-install-9q7018wt/pysha3/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /tmp/pip-record-pjjhc4qx/install-record.txt --single-version-externally-managed --compile --install-headers /home/develop/venv_pypy/include/site/python3.5/pysha3 Check the logs for full command output.
sybrenstuvel added a commit that referenced this issue Jun 11, 2020
The third-party library that adds support for this to Python 3.5 is a
binary package, and thus breaks the pure-Python nature of Python-RSA.

This should fix [#147](#147).
@sybrenstuvel
Copy link
Owner

@sybrenstuvel sybrenstuvel commented Jun 11, 2020

This should be fixed now. No SHA3 on Python 3.5 though (or PyPy that's at 3.5 level), but it does make the entire thing installable for you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants