-
Notifications
You must be signed in to change notification settings - Fork 312
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
[Build] Support windows in resolve_buck.py #4856
base: main
Are you sure you want to change the base?
Conversation
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/executorch/4856
Note: Links to docs will display an error until the docs builds have been completed. This comment was automatically generated by Dr. CI and updates every 15 minutes. |
print(f"Downloading buck2 from {buck2_archive_url}...", file=sys.stderr) | ||
urllib.request.urlretrieve(buck2_archive_url, archive_file.name) | ||
archive_file, _ = urllib.request.urlretrieve(buck2_archive_url) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This change is based on posit-dev/py-shiny#287
It works around PermissionError on Windows.
This happens because urlretrieve
is trying to open an already-open temporary file by name, which isn't permitted on Windows. It's basically the same as
from tempfile import NamedTemporaryFile
with NamedTemporaryFile() as tmp:
open(tmp.name, "wb")
Gentle ping. |
Don't have access to add more reviewer myself :( |
Add Windows support to BUCK_PLATFORM_MAP. Also use urllib.request.urlretrieve directly to work around PermissionError on Windows. For pytorch#4661
948a153
to
07f5c52
Compare
Rebased and gentle ping again. |
Add Windows support to BUCK_PLATFORM_MAP.
Also use urllib.request.urlretrieve directly to work around PermissionError on Windows.
For #4661