[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

PyPi twine check does not like my README.rst files anymore

I am update some PyPI projects and found that twine was refusing the upload.

I have been googling and reading the PyPI guides but did not find anthing
that helps me understand what is required.

What am I doing wrong?

Using the twine check command I get reports about the reasons.

All the code on https://github.com/barry-scott/namedstruct
where you can see the README.rst rendered in full.
Where as at https://pypi.org/project/namedstruct/
only the first line is rendered.

Checking distribution dist\namedstruct-1.2.1-py3-none-any.whl: warning: `long_description_content_type` missing.  defaulting to `text/x-rst`.
Checking distribution dist\namedstruct-1.2.1.tar.gz: warning: `long_description_content_type` missing.  defaulting to `text/x-rst`.
The project's long_description has invalid markup which will not be rendered on PyPI. The following syntax errors were detected:
line 1: Severe: Unexpected section title or transition.

The part of setup.py that does this is:



    description='namedstruct encapsulates struct.unpack() with results accessed by name',

    # The project's main homepage.

Where should I have added the content type?

The other reason is the show stopper.

It does not allow me to have sections in my README.rst.

The README.rst starts with:

Module namedstruct

namedstruct encapsulates struct.unpack() and struct.pack() with results accessed by name.


  class namedstruct.namedstruct

If I remove the sections the README.rst shown only has the first line of the readme
twine allows be to upload but only the first line of the README is rendered.