Skip to content
This repository was archived by the owner on May 30, 2020. It is now read-only.

README.rst in sdist but not visible at all on page #653

Closed
rgommers opened this issue Jun 20, 2017 · 6 comments
Closed

README.rst in sdist but not visible at all on page #653

rgommers opened this issue Jun 20, 2017 · 6 comments

Comments

@rgommers
Copy link

This is for https://pypi.python.org/pypi/numpydoc/0.7.0

The tarball contains a README.rst file. The contents of that file haven't changed at all since the 0.6.0 release, which looks fine (https://pypi.python.org/pypi/numpydoc/0.6.0). It was uploaded with twine upload dist/numpydoc-0.7.0.tar.gz.

Rendering failing is one thing, but no output at all on the page is very weird and hard to debug.

@rgommers
Copy link
Author

OK never mind, figured it out and fixed it via the edit page in the web UI.

@berkerpeksag
Copy link
Collaborator

I think you need to set long_description field in setup.py if you don't want to edit it via web UI everytime you release a new version of the package.

@jamadden
Copy link
Collaborator

If the description isn't filled in, PyPI will look for a README and that appears like it should find README.rst.

But I second the suggestion to fill in long_description. Explicit is better than implicit!

@rgommers
Copy link
Author

Thanks @berkerpeksag. Just figured that out.

Agree that if long_description is missing, it should put the README / README.rst content in there. Just committed this:

+def read(fname):
+    """Utility function to get README.rst into long_description.
+
+    ``long_description`` is what ends up on the PyPI front page.
+    """
+    return open(os.path.join(os.path.dirname(__file__), fname)).read()
+
+
 setup(
     name="numpydoc",
     packages=["numpydoc"],
     version=version,
     description="Sphinx extension to support docstrings in Numpy format",
+    long_description=read('README.rst'),
     # classifiers from http://pypi.python.org/pypi?%3Aaction=list_classifiers
     classifiers=["Development Status :: 4 - Beta",
                  "Environment :: Plugins",

Seems a bit unnecessary ....

@berkerpeksag
Copy link
Collaborator

If the description isn't filled in, PyPI will look for a README and that appears like it should find README.rst.

Good point, I keep forgetting that, thanks! Perhaps it should be mentioned in PyPUG.

@dstufft
Copy link
Member

dstufft commented Jun 20, 2017

I don't believe Warehouse does that actually.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants