/usr/include is hardcoded in setup.py

Bug #1089822 reported by David Nyström
12
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
Revision history for this message
Paul Smith (psmith-gnu) wrote :

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.

Revision history for this message
Richard Mitchell (mitchellrj) wrote :
Revision history for this message
Paul Smith (psmith-gnu) wrote :

I just checked the latest pycrypto release 2.6.1 and it still appears that this patch from 2014 has not been applied... am I missing something?

Revision history for this message
Paul Smith (psmith-gnu) wrote :

Oh I see... there hasn't been a pycrypto release since 2013. That explains that, I suppose!!

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.