1. PyPy
  2. PyPy project
  3. pypy
  4. Issues


Issue #997 wontfix

PyCrypto fails to build with pypy/cpyext

Tristan Seligmann
created an issue

From (bugs.pypy.org)

Comments (7)

  1. Amaury Lepicard

    Unfortunately PyCrypto accesses the internal representation of PyLong objects, which pypy cannot expose. This part of PyCrypto (in _fastmath.c: mpzToLongObj and longObjToMPZ) has to be modified before pypy can compile this module.

    Unfortunately the CPython API does not provide many alternatives. _PyLong_FromByteArray() could be used, but it requires an additional copy and would be slower.

    The best would be to invent a new CPython API: PyLong_GET_DIGITS() and PyLong_GET_SIZE(), which PyPy could implement like the string object and allow a mutable buffer until the object exits the function.

  2. Amaury Lepicard
    Glyph, I guess you don't have LIBGMP installed:
    "warning: GMP or MPIR library not found; Not building 
    After installing libgmp-dev, _fastmath.c cannot compile.
  3. Log in to comment