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

Incompatible with PyPy #16

Closed
dan-blanchard opened this issue Dec 19, 2017 · 3 comments
Closed

Incompatible with PyPy #16

dan-blanchard opened this issue Dec 19, 2017 · 3 comments

Comments

@dan-blanchard
Copy link

Steps to reproduce:

  1. Try to pip install ssh2-python from a PyPy interpreter.
  2. Build will fail:
  cc -O2 -fPIC -Wimplicit -Ilibssh2/include -I/home/travis/virtualenv/pypy-5.4.1/include -c pssh/native/ssh2.c -o build/temp.linux-x86_64-2.7/pssh/native/ssh2.o -O3
  pssh/native/ssh2.c:845:3: error: unknown type name ‘PyBaseExceptionObject’
     PyBaseExceptionObject __pyx_base;
     ^
  pssh/native/ssh2.c:857:3: error: unknown type name ‘PyBaseExceptionObject’
     PyBaseExceptionObject __pyx_base;
     ^
  pssh/native/ssh2.c:917:3: error: unknown type name ‘PyBaseExceptionObject’
     PyBaseExceptionObject __pyx_base;
     ^
  pssh/native/ssh2.c:929:3: error: unknown type name ‘PyBaseExceptionObject’
     PyBaseExceptionObject __pyx_base;
     ^
  pssh/native/ssh2.c:941:3: error: unknown type name ‘PyBaseExceptionObject’
     PyBaseExceptionObject __pyx_base;
     ^
  pssh/native/ssh2.c:953:3: error: unknown type name ‘PyBaseExceptionObject’
     PyBaseExceptionObject __pyx_base;
     ^
  pssh/native/ssh2.c:965:3: error: unknown type name ‘PyBaseExceptionObject’
     PyBaseExceptionObject __pyx_base;
     ^
  pssh/native/ssh2.c:976:3: error: unknown type name ‘PyBaseExceptionObject’
     PyBaseExceptionObject __pyx_base;
     ^
  error: command 'cc' failed with exit status 1

Expected behaviour: Install would succeed.

Actual behaviour: Compile failed as above.

Additional info: libssh2 1.4.3, Ubuntu 14.04, gcc 4.8.4, PyPy 5.4.1

@pkittenis
Copy link
Member

Hi there,

Thanks for the interest and the report. The above error is actually from parallel-ssh, but both projects have same issue building on pypy. This is fixed in latest master branches for both projects, releases pending some travis CI issues.

Note that parallel-ssh is not supported on libssh2 < 1.6. ssh2-python by itself works with caveats for known issues on old versions like lack of thread safety. You will need to install a recent version of libssh2 if wanting to use parallel-ssh on pypy, though it builds without errors if just for CI purposes. For production use I'd also recommend PyPy >= 5.9 as its C-API performance has improved a lot.

Also, PyPy does not support distributable wheels yet so no binary wheels are built for pypy. CPython wheels include libssh2 and other dependencies for both parallel-ssh and ssh2-python on all platforms.

@pkittenis
Copy link
Member

New versions with this fix published for both projects, including binary wheels for all (CPython) platforms.

@dan-blanchard
Copy link
Author

@pkittenis Awesome! Thanks!

Red-M pushed a commit to Red-M/ssh2-python that referenced this issue Jun 27, 2020
        Pypy build compatibility - make exception classes regular python classes

Resolves ParallelSSH#16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants