Just throwing out a blanket call to see if anyone has been able to install the Pycrypto module (2.1.0) from source using Python 3.1.1?
I have been able to get past two minor errors:
1. Error -
File "setup.py", line 46
raise RuntimeError, ("The Python Cryptography Toolkit require "
^
SyntaxError: invalid syntax
Solution - remove comma (,) and space prior to bracket
2. Error -
File "setup.py", line 277, in <module>
define_macros=[endianness_macro()]),
File "setup.py", line 115, in endianness_macro
raise AssertionError("Machine is neither little-endian nor big-endian")
Solution - the above error is raised as the prior "if's" test a byte
and a string. Solve this by placing .encode() after each
string:
change - if s == "\x00\x11\x22\x33":
to - if s == "\x00\x11\x22\x33".encode():
Once the above has been done the build process continues until I hit my current error which is eluding a solution.
The error is in the file: pycrypto-2.1.0/src/_fastmath.c
and appears on multiple lines that reference the same function and object/struct:
In function 'longObjToMPZ':
error: 'PyLongObject' has no member named 'ob_size'
PyLongObject is defined as a struct of type _longobject within the header /usr/include/python3.1/longobject.h
_longobject is defined as follows:
struct _longobject{
PyObject_VAR_HEAD
digit ob_digit[1];
};
As you can see there is no member called ob_size, but, PyObject_VAR_HEAD is a macro defined in Python as:
PyObject_HEAD
Py_ssize_t ob_size;
So the pesky little member appears to be there but not being seen
Any help working out how to have gcc (the one raising the errors) see the member ob_size would be greatly appreciated
If you need anymore information, please let me know?
Cheers
Grail