gijzelaerr / python-snap7

A Python wrapper for the snap7 PLC communication library
http://python-snap7.readthedocs.org/
MIT License
643 stars 245 forks source link

find_locally hardcodes the dynamic lib extension to .dll and might only work on Windows #300

Closed MAKOMO closed 3 years ago

MAKOMO commented 3 years ago

Platform should be respected as in the function find_in_package()

gijzelaerr commented 3 years ago

in what case does this become a problem?

find_locally should only be used on windows, since only on windows you can have a shared library / dll in the local directory. on OSX and Linux you need to set the library path to the location of the shared lib.

MAKOMO commented 3 years ago

to find the library on macOS in a app bundle find_locally might be useful, but you are right, one can just organize things differently and point the library path to it