PyFixate / Fixate

Framework for hardware test fixtures and automatic test environments
MIT License
22 stars 17 forks source link

hard coded path for libftd2xx.so won't work everywhere #79

Closed clint-lawrence closed 5 years ago

clint-lawrence commented 5 years ago

PR #77 added linux support for the existing ftdi driver for linux. The path to the shared library file is hard coded as '/usr/local/lib/libftd2xx.so'. That will break on installations that use a different install prefix.

Not sure if it's the right solution, but ctypes has a find_library function https://docs.python.org/3/library/ctypes.html#finding-shared-libraries

@smontanari1, do you want to see if that works?

pazzarpj commented 5 years ago

I belive @smontanari1 confirmed that the hard coded path was the one recommended by the ftdi docs. Although a more generic solution would be appreciated.

clint-lawrence commented 5 years ago

Wonder if it's even possible to install the library elsewhere...? Not a big issue. Not sure I have anything FTDI related at home. Might bring something home and check on OS X also

smontanari1 commented 5 years ago

Install guide I used : https://www.ftdichip.com/Drivers/D2XX/Linux/ReadMe-linux.txt Says to copy the drivers after building to usr/local/lib/, which appears to be the default install location under GNU standards for shared libraries. It would be possible to install it somewhere else but wouldn't make sense to do so.

pazzarpj commented 5 years ago

I think I'll close this issue unless we can see a specific case of the library being in a different location.