setuptools (39.1.0) doesn't set up Description-Content-Type correctly on Windows
See original GitHub issueOriginally reported in pypa/warehouse#4341.
It looks like long_description
is full of Windows-style carriage-return characters (^M) which seem to have confused twine/pkginfo about what is and what isn’t part of long_description.
My project at PyPI is at: https://pypi.org/project/gff3tool/1.4.2.
Libraries used:
wheel==0.31.1
setuptools==39.1.0
twine==1.11.0
Issue Analytics
- State:
- Created 5 years ago
- Reactions:1
- Comments:9 (3 by maintainers)
Top Results From Across the Web
long_description_content_type=text/markdown doesn't always ...
I have setuptools 39.0.1, twine 1.11.0, and wheel 0.31.0, and I ran python setup.py sdist upload . I even deleted ConceptNet ...
Read more >Why do I have Description-Content-Type: UNKNOWN
It is available in the Core Metadata v2.1. You can use this metadata in you setup.py to specify the content type of your...
Read more >setuptools 3.0.1 - PyPI
Easily download, build, install, upgrade, and uninstall Python packages.
Read more >How to Setup Your Python Environment for Machine Learning ...
3. Start and Update Anaconda · 1. Open a terminal (command line window). · 2. Confirm conda is installed correctly, by typing: 1....
Read more >setuptools Changelog - pyup.io
Instead, projects are encouraged to properly configure ``packages`` or use ... <https://packaging.python.org/specifications/#description-content-type>`_
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I’ve also had a similar issue when trying to upload a sdist to PyPI that was rejected and
twine check
said:Even though we did set
long_description_content_type='text/markdown'
. However, I could only reproduce it when the sdist was generated on GitHub Action on a Windows CI instance, not locally.Specifically, we set the long description by doing:
But the generated Windows CI generated sdist (with
python setup.py sdist --formats=gztar
) created a sdist whosePKG-INFO
was malformed. Specifically, it’sDescription
field containing the description replaced all the\r\n
in the original description with\r\r\n
.Changing our
long_description
tofileh.read().decode("utf8").replace('\r\n', '\n')
fixed the issue.Here’s another case of this happening: https://github.com/pypa/warehouse/issues/3664#issuecomment-439508132