`fcntl` package only works on Linux/Unix systems
The state/cache file writing utility that I wrote a few months back uses the fcntl
package that comes with base Python to handle file locking. It turns out that this package is only available on Unix/Linux systems and that relying on it has broken support for Geomag-Algorithms on Windows. Right now, if a user installs geomag-algorithms in a Windows environment then tries to run anything that relies on Util.py
, e.g.: geomag.py
, it will halt with a No module named 'fcntl'
error.
File locking is fairly important for state/cache files. I found a couple of possible 'fixes' online:
- Add in OS-dependent code that uses
win32api
instead offcntl
if the OS is Windows-based. - Use a third-party package such as portalocker. This would mean that we would have to officially add a new package requirement for users.