When we tried to upload this package to pypi, we got this error:
Checking dist/django_server_status-0.7.1-py3-none-any.whl: FAILED
`long_description` has syntax errors in markup and would not be rendered on PyPI.
line 6: Error: Unexpected indentation.
warning: `long_description_content_type` missing. defaulting to `text/x-rst`.
Checking dist/django-server-status-0.7.1.tar.gz: FAILED
`long_description` has syntax errors in markup and would not be rendered on PyPI.
line 6: Error: Unexpected indentation.
warning: `long_description_content_type` missing. defaulting to `text/x-rst`.
The problem is that newlines in the description field is not handled properly by the packaging tool. The line 6 part is misleading above. README.rst is valid restructured text but the METADATA of the wheel looks like this:
line 6 refers to the indentation within the METADATA file, not the README.rst file. From the docs it looks like Metadata format 1.1 was agnostic on this but Metadata 2.1 specifically requires newlines to have 7 spaces and a | after each newline character. This attempts to fix the issue by handling this in the setup.py file.
When we tried to upload this package to pypi, we got this error:
The problem is that newlines in the description field is not handled properly by the packaging tool. The
line 6
part is misleading above.README.rst
is valid restructured text but theMETADATA
of the wheel looks like this:line 6
refers to the indentation within theMETADATA
file, not theREADME.rst
file. From the docs it looks like Metadata format 1.1 was agnostic on this but Metadata 2.1 specifically requires newlines to have 7 spaces and a|
after each newline character. This attempts to fix the issue by handling this in the setup.py file.