gbishop / cython-hidapi

Python wrapper for the hidapi (not active, use one of the forks)
Other
50 stars 56 forks source link

Build from PyPi fails because of missing 'hid.c' #7

Open jbaiter opened 11 years ago

jbaiter commented 11 years ago

When I try to install hidapi from PyPi using pip, the compilation fails because it cannot find hid.c:

$ pip install hidapi                                                                                                                                                      
Downloading/unpacking hidapi
  Downloading hidapi-0.7.0-1.tar.gz
  Running setup.py egg_info for package hidapi

Installing collected packages: hidapi
  Running setup.py install for hidapi
    building 'hid' extension
    x86_64-linux-gnu-gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -I/usr/include/libusb-1.0 -fPIC -I/usr/include/python2.7 -c hid.c -o build/temp.linux-x86_64-2
.7/hid.o
    gcc-4.7.real: error: hid.c: No such file or directory
    gcc-4.7.real: fatal error: no input files
    compilation terminated.
    error: command 'x86_64-linux-gnu-gcc' failed with exit status 4
spacenate commented 8 years ago

I also ran in to this issue, on Mac OS X (10.9.5). This occurred when using the PyPi package through pip, as well as when trying to build from source (using trezor's branch). I was able to resolve it by upgrading setuptools, like so:

[sudo] pip install setuptools --upgrade
basnappl commented 5 years ago

Thank you spacenate. Upgrading setuptools also resolved this issue for me.