LumaPictures / pymel

Python in Maya Done Right
Other
479 stars 130 forks source link

samefile does not exist for Windows #358

Closed kartikg3 closed 8 years ago

kartikg3 commented 8 years ago

Some modules use os.samefile to check for same files, namely:

maya/utils.py pymel/util/path.py pymel/tools/mel2py/melparse.py

Out of these maya/utils.py is the one that causes much pain when testing Pymel in Windows.

As of Python version < 3k, os.samefile has no implementation on Windows (primarily because os.stat.st_ino and os.stat.st_dev, which samefile's underlying os.samestat relies on won't return correct values on Windows).

kartikg3 commented 8 years ago

In my local fork, I am doing a direct stat compare, which is also less than ideal. Need to have a samefile hack provided along with PyMEL so it continues functioning in Windows.