Skip to content
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

Merged
merged 5 commits into from
Feb 24, 2016
Merged

More fixes for windows #202

merged 5 commits into from
Feb 24, 2016

Conversation

mikekap
Copy link
Contributor

@mikekap mikekap commented Jan 20, 2016

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.

@mikekap
Copy link
Contributor Author

mikekap commented Feb 5, 2016

Ping :)

@mikekap
Copy link
Contributor Author

mikekap commented Feb 21, 2016

Ping.

@mikekap
Copy link
Contributor Author

mikekap commented Feb 22, 2016

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
@mikekap
Copy link
Contributor Author

mikekap commented Feb 24, 2016

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

@kwlzn
Copy link
Contributor

kwlzn commented Feb 24, 2016

lgtm! 👍

kwlzn added a commit that referenced this pull request Feb 24, 2016
@kwlzn kwlzn merged commit 9e4e0c1 into pex-tool:master Feb 24, 2016
@kwlzn
Copy link
Contributor

kwlzn commented Feb 24, 2016

thanks for the PR @mikekap - I'll get a release out soon so folks can consume this via pypi.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants