Skip to content

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

Merged
merged 4 commits into from
Jan 26, 2023

Conversation

datapythonista
Copy link
Member

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.

Copy link
Member

@lithomas1 lithomas1 left a 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"
Copy link
Member

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?

Copy link
Member Author

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' | \
Copy link
Member

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).

Copy link
Member Author

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.

Copy link
Member Author

@datapythonista datapythonista left a 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"
Copy link
Member Author

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' | \
Copy link
Member Author

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.

@datapythonista datapythonista merged commit 588a749 into pandas-dev:main Jan 26, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants