gafusion / omas

Ordered Multidimensional Array Structure
http://gafusion.github.io/omas
MIT License
30 stars 14 forks source link

Windows compatibility via removal of `pwd` module #186

Closed Reksoatr closed 2 years ago

Reksoatr commented 2 years ago

OMAS can be successfully built and installed on Windows machines (for example, through the Anaconda package manager) save for the dependency of OMAS on the pwd module, which is only available on UNIX machines. I propose to fork OMAS into a 'Windows compatible' branch where this dependency on pwd (which only shows up once in omas_setup.py and once in omas_utils.py) is removed

orso82 commented 2 years ago

@Reksoatr we certainly do not want to maintain two versions of the source code, but you are welcome to test (bot in omas_setup.py and once in omas_utils.py) with something like

if platform.system() == 'Windows':
   ...
else
   import pwd
end
orso82 commented 2 years ago

pwd is not used extensively and It would be ideal if you could substitute the Linux/MAC pwd dependency and coding with something that work under Windows 👍

Reksoatr commented 2 years ago

I think I've figured out a good fix to bypass the pwd module check if the OS turns out to be Windows. I'll open a new Pull Request with those changes shortly.