Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Failure to extract dependencies to ~/.pex/install if they already exist with some Python version #265
Specifically on a host running Python 2.7.5 we ran into the following stack trace:
In this case we're on a slightly older version of pex, line 177 in util.py is:
So, the rename fails because the directory exists. In this case it's raising EEXIST, whereas pex only expects ENOTEMPTY to be a continuable error code.
Pex should handle EEXIST with the same behavior as ENOTEMPTY in this case.
tl;dr if you're catching the exception, use the broader
Python invokes system calls, in the case of
Anyway, you'll want a more robust approach that is kernel and filesystem agnostic.
@jcohen it'd be great to get your repro details for this. afaict, this is actually a race condition vs a simple "run pex twice on centos7" bug:
there is logic in:
which checks for existence of
hence, would be great to confirm this theory with a repro.