Cross-compiling porting of io.h, distutils compilator argument

Otacon22 otacon22 at email.it
Tue Oct 23 09:20:59 EDT 2007


Hi all,
I want to create a robot with a router board based on processor
atheros 2.6, called "fonera".
I have installed a version  of linux, Openwrt and python and i want to
use it for some reasons, but i have problems to have access to GPIO
pins on the board to read and write on harware(pic, memories...) so i
want to include into python a porting of io.h
I founded an  already python wrapped version of io.h called ioport.c
that i found here:
http://www.hare.demon.co.uk/ioport/ioport.html
( i can't use pyparallel because i need to specify port
address ,different from parallel )
but i have a problem: the compiler for that platform can be used only
in cross compiling mode, and i have it on my pc, so it is compiled for
my pc, and i can't use it on my router.

I know that to compile that module to been used i need to use
distutils, but distutils, when i run it, say me that can't find the
compiler gcc, so the only way that i have to compile this module is to
compile it on my pc, but i need to use the cross-compilator.So i need
to specify to distutils the path of the compilator, and also where to
pick io.h, because the io.h version for openwrt is different, and i
have it with the cross-compilator, so i need also to specify the path
of include libraries.
If someone know how i can also directly use the gcc cross-compilator
to build the module, without using distutils, but i need also to know
when i compile it, then howto use on python as library.

thanks

Otacon22




More information about the Python-list mailing list