/usr/include is hardcoded in setup.py
Bug #1089822 reported by
David Nyström
This bug affects 2 people
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Python-Crypto |
Confirmed
|
Undecided
|
Unassigned |
Bug Description
Since /usr/include is hardcoded in setup.py, this makes cross compiling cumbersome.
I would suggest using automake to compile the C code, and let setup.py do the python stuff to adhere to common
interfaces.
Changed in pycrypto: | |
status: | New → Confirmed |
To post a comment you must log in.
I found this painful bug as well. However, automake etc. is completely unnecessary. A properly configured cross-compiler knows where to look for the proper cross-system headers and libraries. All you have to do is _never_ include any system header directories or library directories in your compile or link lines (never add -I/usr/include or -L/lib -L/usr/lib etc.), and when you run with the cross-compiler (just like any other compiler) it will automatically look for the right system headers in the right place.
Simply removing the '/usr/include' from the include_dirs list for Crypto. PublicKey. _fastmath is the right answer.