-
-
Notifications
You must be signed in to change notification settings - Fork 289
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
More fixes for windows #202
Conversation
Ping :) |
Ping. |
Would this be easier to review if I made separate PRs for each commit? That would be fairly easy to do since they're not really dependent on each other. |
This also fixes handling of weird characters in the filename (e.g. test#binary.pex is no longer a url fragment).
Resolve the path before relativizing it & always use / as the path separator in the hash.
The egg metadata code would incorrectly try to munge a windows path as a posix one. Instead treat the zip_pre[fix] as OS-dependent and normalize only the suffix.
tar isn't as readily available; zip works fine.
The main points of note are: - Use temporary_filename() to get a filename without any open handles (Windows will not let you unlink a file that has open handles). - Get rid of NamedTemporaryFile/temporary_file in lieu of using our helper in util. - Pexs aren't executable on windows directly - run them as `python ...` - Skip soft/hard link tests on windows - Small fixes w.r.t. / vs \ and s/\r//g
436ee1b
to
f03ce12
Compare
Fixed the comments; PTAL @ the link commit, since it involved some urllib.unquote additions (which I think make Link.py even more correct). Almost feels like link.py should be open-sourced on it's own :P |
lgtm! 👍 |
thanks for the PR @mikekap - I'll get a release out soon so folks can consume this via pypi. |
Now all the tests pass.
One thing I'm not sure about is in the first commit - perhaps we should do away with Link.local_path & make Link.path do the proper thing? I don't think there's a single user of Link.path that uses it for real urls. Let me know what you think.