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
Twine check incorrectly reports long_description_content_type
missing
#454
Comments
Can you please upload both |
I have attached the PKG-INFO above. Interestingly, today I still get an error message from Twine 1.13.0
Twine 1.12.1
You can see the full code on https://github.com/martisak/3gpp-citations |
The issue is that the multiple lines in your Essentially a duplicate of pypa/setuptools#1390. |
The issue is that the multiple lines in the `License` field are causing the rest of the file to be interpreted as the `Long-Description`. See pypa/twine#454 and pypa/setuptools#1390
Oh, nice! Everything worked after that, thanks a million @di ! |
See pypa/twine#454 (comment): the "license" field should be a single statement (content other than the description with double newlines breaks the metadata). Signed-off-by: Yves Bastide <yves@botify.com>
@di If this is the case, is it better to emit a warning in case the license field has more than one line? |
The full license text breaks PKG-INFO. pypa/twine#454 (comment) Also added PyPI supported classifier for the BSD license
The full license text breaks PKG-INFO. pypa/twine#454 (comment) Also added PyPI supported classifier for the BSD license
In bifacialvf package setup, the content-type is given (and in PKG-INFO) and the license is only 1-line (3-letters) "BSD" and yet with twine-1.13 on windows with Python-3.7 I also get this weird error:
but it works with twine-1.12.1 I think this is still a legit issue, and I haven't seen a fix for it in this thread other than downgrading. |
@mikofski it appears your situation is different from everyone else's in this thread. Please open a new issue and provide all of the information requested. |
FYI: everything worked fine on my mac os x, with twine-1.13, so there may be something to do with the env on my pc. I will dig deeper, and open a new issue of I can't resolve. Thanks so much! |
@mikofski I suspect it's the version of setuptools |
This value is intended to be the name of the license with the details being included in a LICENSE file in the .tar.gz. pypa/twine#454 (comment)
…ding the license text as an argument in setup.py (pypa/twine#454)
…ding the license text as an argument in setup.py (pypa/twine#454) (#235)
…ed by adding the license text as an argument in setup.py (pypa/twine#454) (#235)" This reverts commit 9dad3b4.
Avoid reading the entire license in setup.py as this gets apparently interpreted by twine as the long description. Instead, set license simply to the name of the type of license. See discussion here: pypa/twine#454
See pypa/twine#454 for a way to catch this via CI.
See pypa/twine#454 for a way to catch this via CI.
See pypa/twine#454 for a way to catch this via CI.
See pypa/twine#454 for a way to catch this via CI.
See pypa/twine#454 for a way to catch this via CI.
…ding the license text as an argument in setup.py (pypa/twine#454) (#235)
This happened to me today and took around an hour to find this post and fix. The error wasn't with |
I spent an hour too. Only this suddenly helped me (all versions was up to date): |
Your Environment
Thank you for taking the time to report an issue.
To more efficiently resolve this issue, we'd like to know some basic information about your system and setup.
Your operating system:
Mac OS X
Version of python you are running:
Python 3.7.2
How did you install twine? Did you use your operating system's package manager or pip or something else?
pip install twine==1.13.0
Not working
Working
PyPI
If you're having issues uploading a specific package, you must include a copy of the following:
PKG-INFO
file.pypirc
file (REMOVE ALL USERNAMES & PASSWORDS BEFORE UPLOADING)The Issue
With Twine 1.13.1
twine check dist/*
reportsand
PKG-INFO
is missingDescription-Content-Type: text/markdown
.With Twine 1.12.1
PKG-INFO
correctly containsDescription-Content-Type: text/markdown
Steps to Reproduce
If the issue is predictable and consistently reproducible, please list the steps here.
long_description_content_type='text/markdown'
to yoursetup.py
.This will result in
Checking distribution dist/mypackage.tar.gz: Passed
PKG-INFO
correctly containsDescription-Content-Type: text/markdown
This will result in
PKG-INFO
is missingDescription-Content-Type: text/markdown
.PKG-INFO.txt
The text was updated successfully, but these errors were encountered: