-
-
Notifications
You must be signed in to change notification settings - Fork 254
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
pex fails to run on windows: "No module named 'fcntl'" #1155
Comments
@mgrandi unfortunately, this is expected: We currently have no contributors that use Windows which is likely the boost we need to get Windows CI set up to give us a green baseline to develop against and ensure we don't start providing Windows support while continually degrading. If you're willing to step in and champion a Windows support effort, that would be lovely. Besides CI setup, at a minimum work will be needed where you hit this error - which is file locking code and likely various bits of code that assume creating symlinks will work (IIUC they require special privileges on Windows). |
I have the same issue as OP. I had built my toolchain around |
Thanks for the anecdote @chrisjbremner and the fcntl alternative suggestion. Note though that Pex can never support Windows in good faith until it grows Windows CI jobs to ensure things stay green. If either of you wants to pitch in and get this all set up then we can do the 1st official release that adds |
Sorry @chrisjbremner missed your last sentences... Something like portalocker would be fine as long as its small, focused and well tested. It would be added and accessed via the vendoring system. So that means:
Its not quite that simple since this library would be needed at both build-time and runtime though. So you'd also need to add the |
The vendoring does throw a wrench in things a little bit as |
Yeah, that's not awesome. Maybe https://github.com/harlowja/fasteners ? That also has the pywin32 dependency, but opts to vendor in the small slices it needs. |
I'll try out a few as suggested here and report back |
Alternatively - and I think preferrably - just add the windows-specific code. Pex only uses an exlusive write lock and that impl in fasteners does not require pywin32: That code verbatim would not be exactly right since Pex does a blocking lock, but presumably some flags could be changed to get the desired result. |
Do you know how long files are locked for? Would using |
The lock is forever - its a blocking write lock: So some sort of loop over the lock attempt that allows for OSError will be needed it seems. It would be great if that OSError coud be narrowed down though via an errno - that's a disturbingly broad exception catch on the surface. |
It seems to manifest itself as a |
The text was updated successfully, but these errors were encountered: