embray / sage-windows

Sagemath for Windows (Archived) Please see https://github.com/sagemath/sage-windows

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Can't create symlinks in mounted Windows home directory

embray opened this issue · comments

Currently we have things set up so that the users's USERPROFILE i.e. C:\Users\<username>--the closes thing Windows has to a home directory--is automatically mounted under /home/sage.

This creates problems because Python thinks it's running in Linux and assumes it should be able to create symlinks. Python does handle this somewhat gracefully insofar as it raises an OSError. But most software written in Python tends to assume that if we're in Linux os.link will work eventually (whereas on Windows the function isn't even normally available).

This is seen in a most extreme case in pip (v6.1.1 at least) which tries so very hard to create a symlink to a lockfile in some cases that it will go into an infinite loop, since it doesn't provide a timeout for the lockfile creation.

Need to check whether the specific issue in pip is rectified, but also need to think about how to address this in other software. To an extent if other third-party software isn't handling exceptions from os.link properly that's their fault, but I would not be surprised if it's nonetheless very common...