-
-
Notifications
You must be signed in to change notification settings - Fork 18.6k
Add script to automatically download wheels #50859
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
Add script to automatically download wheels #50859
Conversation
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.
LGTM. Small QOL comment below
awk '{print "https://anaconda.org" $0 }' | \ | ||
xargs wget -P $DIST_DIR | ||
|
||
printf "\nWheels downloaded to $DIST_DIR\nYou can upload them to PyPI using:\n\n" |
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.
Maybe a small QOL improvement would be to print which wheels were downloaded?
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.
Not sure if I know how to do it without making the script significantly more complex. I can just do a ls dist/
but assuming there were wheels in that directory it can report wrong information.
It's not super nice, but the log of wget shows the file names as they are downloaded. There is some noise in between files, but my preference would be to just have that. The alternatives I see are to save the url list in a temporary file, and then print the file content with a regex to remove the parts of the url that are not the file. Not worth in my opinion.
|
||
curl "https://anaconda.org/multibuild-wheels-staging/pandas/files?version=${VERSION}" | \ | ||
grep "href=\"/multibuild-wheels-staging/pandas/${VERSION}" | \ | ||
sed -r 's/.*<a href="([^"]+\.whl)">.*/\1/g' | \ |
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.
Maybe not now, but in the future, might want to expand this to downloading the sdist too when we move to cibuildwheel(hopefully for 2.0).
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.
There is no sdist now in https://anaconda.org/multibuild-wheels-staging/pandas/files?version=1.5.3 . We can add it by editing the regex if the new implementation adds it. We can also edit the release instructions at that point to not build the sdist locally.
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.
Let me know if you've got a better idea than mine to print the download file names, otherwise I'll merge like it is for now.
awk '{print "https://anaconda.org" $0 }' | \ | ||
xargs wget -P $DIST_DIR | ||
|
||
printf "\nWheels downloaded to $DIST_DIR\nYou can upload them to PyPI using:\n\n" |
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.
Not sure if I know how to do it without making the script significantly more complex. I can just do a ls dist/
but assuming there were wheels in that directory it can report wrong information.
It's not super nice, but the log of wget shows the file names as they are downloaded. There is some noise in between files, but my preference would be to just have that. The alternatives I see are to save the url list in a temporary file, and then print the file content with a regex to remove the parts of the url that are not the file. Not worth in my opinion.
|
||
curl "https://anaconda.org/multibuild-wheels-staging/pandas/files?version=${VERSION}" | \ | ||
grep "href=\"/multibuild-wheels-staging/pandas/${VERSION}" | \ | ||
sed -r 's/.*<a href="([^"]+\.whl)">.*/\1/g' | \ |
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.
There is no sdist now in https://anaconda.org/multibuild-wheels-staging/pandas/files?version=1.5.3 . We can add it by editing the regex if the new implementation adds it. We can also edit the release instructions at that point to not build the sdist locally.
There is a similar script in the pandas-release repo, but that repo is not needed anyomore for the release, and it makes more sense to have it here. Also, the original script is in Python, which makes it much more complex. Here I use a shell script with a single command.