Skip to content

REL: get README content on PyPI front page for new releases #100

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

Merged
merged 2 commits into from
Oct 22, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -28,30 +28,30 @@ Options

The following options can be set in conf.py:

- numpydoc_use_plots: bool
- ``numpydoc_use_plots``: bool

Whether to produce ``plot::`` directives for Examples sections that
contain ``import matplotlib``.

- numpydoc_show_class_members: bool
- ``numpydoc_show_class_members``: bool

Whether to show all members of a class in the Methods and Attributes
sections automatically.
``True`` by default.

- numpydoc_show_inherited_class_members: bool
- ``numpydoc_show_inherited_class_members``: bool

Whether to show all inherited members of a class in the Methods and Attributes
sections automatically. If it's false, inherited members won't shown.
``True`` by default.

- numpydoc_class_members_toctree: bool
- ``numpydoc_class_members_toctree``: bool

Whether to create a Sphinx table of contents for the lists of class
methods and attributes. If a table of contents is made, Sphinx expects
each entry to have a separate page.
``True`` by default.

- numpydoc_edit_link: bool (DEPRECATED -- edit your HTML template instead)
- ``numpydoc_edit_link``: bool (DEPRECATED -- edit your HTML template instead)

Whether to insert an edit link after docstrings.
13 changes: 13 additions & 0 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
from __future__ import division, print_function

import sys
import os

from distutils.command.sdist import sdist
import setuptools
Expand All @@ -15,11 +16,23 @@
version = line.strip().split()[-1][1:-1]
break

def read(fname):
"""Utility function to get README.rst into long_description.

``long_description`` is what ends up on the PyPI front page.
"""
with open(os.path.join(os.path.dirname(__file__), fname)) as f:
contents = f.read()

return contents


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",
Expand Down