lthiery / SPI-Py

Hardware SPI as a C Extension for Python
286 stars 150 forks source link

Returning Error and Failing on Install #15

Closed Jbithell closed 8 years ago

Jbithell commented 8 years ago

SPI-Py fails to install, this is from my logs:

arm-linux-gnueabihf-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fno-strict-aliasing -D_FORTIFY_SOURCE=2 -g -fstack-protector-strong -Wformat -Werror=format-security -fPIC -I/usr/include/python2.7 -c spi.c -o build/temp.linux-armv6l-2.7/spi.o
arm-linux-gnueabihf-gcc: error: spi.c: No such file or directory
arm-linux-gnueabihf-gcc: fatal error: no input files
compilation terminated.
error: command 'arm-linux-gnueabihf-gcc' failed with exit status 4
Jbithell commented 8 years ago

Solution is to not to clone the git and then call python setup.py install directly, instead write your own bash script and it seems to work:

#!/bin/bash
cd /
git clone https://github.com/lthiery/SPI-Py
cd SPI-Py
python setup.py install

Very wierd!