uktrade / mobius3

Continuously sync folder to S3, using inotify under the hood
MIT License
50 stars 3 forks source link

Fails on OsX #41

Closed Fabijancic closed 3 years ago

Fabijancic commented 3 years ago

mobius3 fails to run on OsX because od wrong imports:

Traceback (most recent call last):
  File "/Users/username/developer_tools/file-ingestion/main.py", line 3, in <module>
    from mobius3 import Syncer
  File "/Users/username/developer_tools/file-ingestion/.venv/lib/python3.9/site-packages/mobius3.py", line 56, in <module>
    libc = ctypes.CDLL('libc.so.6', use_errno=True)
  File "/usr/local/Cellar/python@3.9/3.9.1_6/Frameworks/Python.framework/Versions/3.9/lib/python3.9/ctypes/__init__.py", line 374, in __init__
    self._handle = _dlopen(self._name, mode)
OSError: dlopen(libc.so.6, 6): image not found

This should probably just be changed so it imports .dylib instead of .so if the platform is darwin. e.g. https://stackoverflow.com/a/35675786

michalc commented 3 years ago

Hi,

Thanks for the report. However, I suspect is't not just a naming thing: mobius3 uses the linux-specific inotify API that isn't present on MacOS. While not impossible that down the line using an API that is present on MacOS could be added, it's not a current plan.