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

[Feature Request] Some way to see all wheels available for a package #5

Closed
henryiii opened this issue Oct 20, 2021 · 12 comments
Closed
Assignees
Labels
enhancement New feature or request

Comments

@henryiii
Copy link
Contributor

Is your feature request related to a problem? Please describe.

I'd like to easily see what platforms are covered by wheels on the latest (or selectable) release.

Describe the solution you'd like

Many a new command (unless it's covered by the ones here) that lists either the wheel names, or perhaps some enhanced view of the tags (some wheels may have multiple tags). It might be really nice to colorize the wheel(s) that match the current platform specially, as well the SDist.

Describe alternatives you've considered
Happy if this is already possible.

Additional context
For example, pipx run --spec pypi-command-line pypi <command> numpy.

PS: Is there a way to escape browse without picking a choice?
PS: What size is listed for releases? numpy's sizes per release don't make sense, unless that's the best matching wheel? Maybe that's what that is.

@henryiii henryiii added the enhancement New feature or request label Oct 20, 2021
@henryiii henryiii changed the title [Feature Request] [Feature Request] Some way to see all wheels available for a package Oct 20, 2021
@wasi-master wasi-master self-assigned this Oct 21, 2021
@wasi-master
Copy link
Owner

wasi-master commented Oct 21, 2021

I'll start working on the wheel command


Is there a way to escape browse without picking a choice?

Press Ctrl+C. I'm sorry if it was unclear but it's also mentioned in the docs :)

What size is listed for releases? numpy's sizes per release don't make sense, unless that's the best matching wheel?

Currently it gets the first item in the releases list
The items are gotten from the releases key in the api response

@wasi-master
Copy link
Owner

wasi-master commented Oct 21, 2021

Hey I just finished the wheels command and now I'm looking for feedback, you can update to the latest version

pip install --update pypi-command-line

If you have suggestions feel free to put them here, I didn't add the feature to colorize the wheel(s) that support the current platform because that's kinda hard to implement, I have kept the code for that and may look into it in the future.

I did add a feature with which it will syntax highlight the parts of the wheel

Image Demo

@wasi-master
Copy link
Owner

wasi-master commented Oct 21, 2021

Just wrote the documentation and published version 1.1.0

Docs for the wheels command: https://wasi-master.github.io/pypi-command-line/usage/#wheels

@henryiii
Copy link
Contributor Author

This is fantastic, thanks! How about a flag that only shows valid wheels on the current platform? Usually, all is what I want, but checking to see if there's a binary wheel available for download would also be handy.

@wasi-master
Copy link
Owner

Reopening this to work on tomorrow

@wasi-master wasi-master reopened this Oct 21, 2021
@wasi-master
Copy link
Owner

Just researched a bit and it seems as there isn't really a straightforward way of checking if a wheel is valid on the current platform. And may I ask what do you specifically mean by the term binary wheel

@wasi-master
Copy link
Owner

Okay I found a way to check if a wheel is valid in the current platform and I'm working on a flag for that

@wasi-master
Copy link
Owner

wasi-master commented Oct 22, 2021

@henryiii I added the --supported-only flag to the wheels command. That will make it so it only shows the wheels supported on the current platform, and about the binary wheel I don't seem to understand what you specifically mean by that?

On Windows
image showing how it looks on windows
On Linux (WSL)
image showing how it looks on linux

@henryiii
Copy link
Contributor Author

henryiii commented Oct 22, 2021

Thanks, that looks great and very useful! By binary wheels I was referring to wheels with compiled binaries (like NumPy), so that they are platform / Python specific, as opposed to a pure Python wheel, which generally works everywhere.

@wasi-master
Copy link
Owner

wasi-master commented Oct 22, 2021

@henryiii That should be gotten from the abi tag (syntax highlighted purple) if I am not mistaken

For numpy, that has a binary wheel, the abi tag part contains the required platform/python for the wheel
image with binary wheel

For pypi-command-line which doesn't need a binary wheel, the abi tag part is none

image without binary wheel

You may also want to update since I recently patched a bug with the syntax highlighting not working

Documentation for the syntax highlighting and what the colors mean: https://wasi-master.github.io/pypi-command-line/usage/#wheel-name-syntax

PS: ABI stands for Application Binary Interface

@henryiii
Copy link
Contributor Author

henryiii commented Oct 25, 2021

Just curious, I tried the following expecting it to work:

$ pipx run pypi-command-line wheels numpy==1.20
🚫 Project or version not found
❕ Some error occured. response code 404
$ pipx run pypi-command-line wheels numpy==1.20.0
🚫 Project or version not found
❕ Some error occured. response code 404

Checking the docs, I see the syntax is PROJECT [VERSION]. Okay, slightly less natural, but can try that:

$ pipx run pypi-command-line wheels numpy 1.20
🚫 Version not found

Finally got it to work with:

$ pipx run pypi-command-line wheels numpy 1.20.0

Might be some user interface ideas in there. :)

FYI, I was looking for the first numpy release to have a pypy37_pp73 wheel.

@wasi-master
Copy link
Owner

@henryiii Now it supports the numpy==1.20.0 syntax and numpy==1.20

Update the package to version 1.4.0 for these to work

Tip: you can just do w instead of typing the whole wheels, e.g. pipx run pypi-command-line w numpy 1.20.0

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

No branches or pull requests

2 participants