-
Notifications
You must be signed in to change notification settings - Fork 35
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
Clarify package metadata #645
Comments
Hi @eliegoudout, this behaviour is specified by the In your examples I think it seems to be working as intended. Is your request for clarification about this translation mechanism to be added to the tutorials, or are you suggesting the standard should be modified to do something different? In the case you would like to propose changes, I would suggest by starting discussing these changes in the Packaging topic of the Python discourse. Specifically, I can highlight the following parts of the standard:
Regarding the When using If you want to avoid that with setuptools I (personally) recommend setting a SPDX identifier in [tool.setuptools]
license-files = ["MYCUSTOM_LICENSE.file"] |
It would be a reasonable feature request for |
Thanks for your very thorough answer @abravalheri.
I guess in the end the project will contain the metadata no matter what, but I find it a bit sad that
definitely looks a bit worse than this (desired output)
to me. Cheers! |
Feature requests (or even PRs, if you're able to do that!) are welcome to improve pip's output here. We've not adapted yet to the implications of the new structure that having metadata defined in |
Okay! I would gladly contribute or feature request, but I'm not even sure how the building/installation ecosystem works, so I'm not even sure where the feature should be added. Is it a problem from pip? Or from hatch? I'm not even sure I understand what's the specific role of hatch in the build process. Even more, I don't really know what is the role of If you could enlighten me, I could probably get more into it! Thanks |
Hi @eliegoudout! If you go to pip's issue tracker at https://github.com/pypa/pip/issues/ and create an issue there, describing what you'd like |
Just a small comment. PEP 621 does not prevent the backend from additionally populating In the initial implementation, |
Yeah, the best way to present PEP 621 data mapped onto project metadata is quite unobvious in the case of project homepage (particularly as there's no clear advice on what key to use in urls for the project homepage). And for that matter the author/maintainer data, although in that case I think the PEP 621 form is clearer. |
Couldn't Something like: $ pip show mypackage
Name: mypackage
Version: 0.0.1
Summary: This is my cool package
Project-URL:
- Homepage: https://www.github.com/author/mypackage
Author-email: Example Author <author.email@example.com>
License: MIT License
| the
| whole
| license
Location: /path/to/site-packages
Requires: required packages
Required-by: requiring packages |
see also https://stackoverflow.com/questions/75570780/pip-show-does-not-show-summary-home-page-author-and-license - i was completly baffled about pip show not showing the fields any more after working on WolfgangFahl/py-3rdparty-mediawiki#92 - i had not expected such a regression when "improving" the project structure. |
OS version
macOS
Python version
3.10.8
Pip version
pip 23.0
Guide link
https://packaging.python.org/en/latest/tutorials/packaging-projects/
Problem description
Hello,
First of all, I want to say that I found the tutorial on building and distributing python packages very well written and helpful. Nevertheless, building my package using
hatch
as suggested, I just have a few questions regardingpyproject.toml
and the metada of the project displayed bypip show
.authors
field, tutorial suggests:which leads to the following
pip show
:when I in fact think that we would like to have
This is possible by separating the
name
andemail
infos as follow:but it seems a bit unnatural, and breaks the logical link between the name and the mail of the author (especially if there are several authors).
Home-page
field. Tutorial suggests:which is well understood by Pypi, but not really by
pip
in CLI. Indeed,pip show
output is blank for this entryand it is only by using
pip show --verbose
that we have the additional info at the bottom:I think it's a bit of a shame because lots of users won't use
--verbose
option and won't have the info they were looking for.I tried really hard to find a way to fix this without using
setuptools
(tutorial recommendhatch
by default, I figured that there must be a reason, especially since I found online thatsetuptools
apparently suffers from deprecation avoidance issues)By the way, this problem is also referenced here.
License
field. Tutorial suggests wrting the info inclassifiers
,but that doesn't seem to fill the
License
field whenpip show
. I found on this specification that I could also useor
The former outputs
My pretty license
uponpip show
, and the latter pastes the content of theLICENCE
file. What would the best practise be? I personally like the second option, but on Pypi.org, it does this funny thing:Thank you in advance for your help!
Error message
No response
The text was updated successfully, but these errors were encountered: