Skip to content

Add build number identifiers to version numbers reported by pip #5210

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

Closed
TheFriendlyCoder opened this issue Apr 12, 2018 · 8 comments · Fixed by #13231
Closed

Add build number identifiers to version numbers reported by pip #5210

TheFriendlyCoder opened this issue Apr 12, 2018 · 8 comments · Fixed by #13231
Labels
state: awaiting PR Feature discussed, PR is needed type: feature request Request for a new feature

Comments

@TheFriendlyCoder
Copy link

  • Pip version: 10.0.0b2
  • Python version: 3.6
  • Operating system: Mac OSX

Description:

In situations where pip presents version information about packages, like when running pip freeze, pip list and even in the error output produced by pip install, the names and version numbers of the packages are presented but the build numbers are excluded. In order to more accurately reflect the content related to these packages these display messages should be updated to include the build numbers, when available, of the packages as well

What I've run:

pip list

expected output:

Package             Version           Build
------------------------------------
MyPackage         1.0.0               12345

actual output:

Package             Version
------------------------
MyPackage         1.0.0
@TheFriendlyCoder
Copy link
Author

This proposed improvement relates to PR #4299

@pradyunsg
Copy link
Member

@TheFriendlyCoder Thanks for filing this issue! :)

This sounds reasonable to me.

I think including the build number in the version column in some way, is an idea worth exploring.

@pradyunsg pradyunsg added type: feature request Request for a new feature resolution: deferred till PR Further discussion will happen when a PR is made labels May 10, 2018
@pradyunsg
Copy link
Member

I've labelled this issue as an "deferred PR".

This label is essentially for indicating that further discussion related to this issue should be deferred until someone comes around to make a PR. This does not mean that the said PR would be accepted - it has not been determined whether this is a useful change to pip and that decision has been deferred until the PR is made.

@chrahunt
Copy link
Member

chrahunt commented Dec 18, 2019

The build number is only expected to be in wheel filenames and isn't persisted anywhere. I don't think we'd want to add it to the installed package metadata without a PEP update (at which time it would likely be the responsibility of the package to include the field and pip could display it).

@chrahunt chrahunt added state: needs discussion This needs some more discussion and removed resolution: deferred till PR Further discussion will happen when a PR is made labels Dec 18, 2019
@pfmoore
Copy link
Member

pfmoore commented Dec 19, 2019

I don't think we'd want to add it to the installed package metadata without a PEP update

Agreed.

@devinrsmith
Copy link

@chrahunt - at least according to this https://peps.python.org/pep-0427/#file-contents, the build number makes it into dist-info/WHEEL.

@uranusjr uranusjr added state: awaiting PR Feature discussed, PR is needed and removed state: needs discussion This needs some more discussion labels Oct 5, 2022
@uranusjr
Copy link
Member

uranusjr commented Oct 5, 2022

I changed the state, PR is welcomed. This can likely be handled similarly to Location (i.e. add a column right after Version if any of the listed packages has a build number). The content of WHEEL is accessible with the metadata interface.

@WoodyWu0310
Copy link

WoodyWu0310 commented Feb 21, 2025

I also want it. In conda list, it shows internal build number. Like

#Name                    Version                   Build  Channel
bzip2                     1.0.8                he774522_0

My team using "version number + internal build number" to identify a 3rd site package, In order to avoid "the version number is same , but codes are different"
Buti in pip list, it only shows

Package         Version
--------------- -------
click           8.1.3

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 1, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
state: awaiting PR Feature discussed, PR is needed type: feature request Request for a new feature
Projects
None yet
7 participants