-
Notifications
You must be signed in to change notification settings - Fork 37
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
Fields are missing when I pip show
my Python package
#670
Comments
I fixed the issue by deleting all but the first 3 lines of
I then added the following configuration to
I now get the following output from
|
As a follow-up question, may I ask why |
This was discussed in PEP 621. Author and Author-Email do not scale to multiple authors, so the non-optional Author-Email field is used with the FYI, this also includes License. While the original plan (in 2001, PEP 241) was to have a short string here for the license, by 2003 (PEP 314) is it specified via Classifiers, which correctly support specific licenses and multiple licenses, and this field is only there to allow text describing deviations from some known license. So you should not fill this in, and use Trove classifiers, unless you are using a non-standard license. The problem is not the filling of the fields, but with
Edit: looks like "no one has done it yet" is likely the correct answer:
For example. |
|
The solution is to change FYI, try pip show on |
Fair enough, changing Locally I currently have Python 3.7.6 (still haven't got round to updating it or had a specific need to), wheel 0.38.4, build 0.10.0, and packaging 23.1, so maybe this explains why those fields are not blank for me |
So I gather that the
Or
But all of these are in a different format to
Suggested by the Packaging Python Projects tutorial, which has the key wrapped in double quotes, and It seems to me as someone who is new to Python packaging like there is not just inconsistency between PEP 345 and |
It's a change in recommended practice, which isn't reflected in the output of
Yes, probably combined with "no one has the stomach to work out what backward compatibility issues we need to consider" 🙁 |
PEP 345 is showing the METADATA format, which is sort of YAML like (technically, it's based on the email module IIRC?), which is not related to the TOML format. Your build backend (setuptools, hatching, flit-core, etc) will convert the standard TOML fields defined in PEP 621 into METADATA. There isn't a field for Home-Page or Author, and there's not really one for License either (the PEP 621 definition didn't match the METADATA definition, and is being revised in PEP 639).
|
OS version
Windows 10
Python version
Python 3.7.6
Pip version
23.1.2
Guide link
https://packaging.python.org/tutorials/packaging-projects
Problem description
(see related Stack Overflow question I asked here)
I recently uploaded my first Python package to PyPI. The relevant parts of
pyproject.toml
are defined as follows (full file available here):After installing this package with the command
python3 -m pip install -U jutility
, I run the commandpython3 -m pip show jutility
, and get the following output:Notably, the
Home-page
andAuthor
fields are empty in the output frompip show
, although they seem to be defined inpyproject.toml
.How should I change
pyproject.toml
to make these fields display properly in thepip show
output?Version-wise, I built and uploaded these packages to PyPI on my Windows 10 PC with Python 3.7.6, but I also tried downloading and installing this package and displaying the
pip show
output from a Google Colab notebook with Python 3.10.11. The package works completely as expected in the Colab notebook, but I get the samepip show
output with emptyHome-page
andAuthor
fields. I'd just like to know what I need to change in order to get these fields to display properly.Error message
No response
The text was updated successfully, but these errors were encountered: