Skip to content

Commit 565f8a4

Browse files
authored
Merge pull request #100 from rgommers/readme
MAINT: get README content on PyPI front page for new releases
2 parents 795239d + 62f56c2 commit 565f8a4

File tree

2 files changed

+18
-5
lines changed

2 files changed

+18
-5
lines changed

README.rst

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -28,30 +28,30 @@ Options
2828

2929
The following options can be set in conf.py:
3030

31-
- numpydoc_use_plots: bool
31+
- ``numpydoc_use_plots``: bool
3232

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

36-
- numpydoc_show_class_members: bool
36+
- ``numpydoc_show_class_members``: bool
3737

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

42-
- numpydoc_show_inherited_class_members: bool
42+
- ``numpydoc_show_inherited_class_members``: bool
4343

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

48-
- numpydoc_class_members_toctree: bool
48+
- ``numpydoc_class_members_toctree``: bool
4949

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

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

5757
Whether to insert an edit link after docstrings.

setup.py

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
from __future__ import division, print_function
22

33
import sys
4+
import os
45

56
from distutils.command.sdist import sdist
67
import setuptools
@@ -15,11 +16,23 @@
1516
version = line.strip().split()[-1][1:-1]
1617
break
1718

19+
def read(fname):
20+
"""Utility function to get README.rst into long_description.
21+
22+
``long_description`` is what ends up on the PyPI front page.
23+
"""
24+
with open(os.path.join(os.path.dirname(__file__), fname)) as f:
25+
contents = f.read()
26+
27+
return contents
28+
29+
1830
setup(
1931
name="numpydoc",
2032
packages=["numpydoc"],
2133
version=version,
2234
description="Sphinx extension to support docstrings in Numpy format",
35+
long_description=read('README.rst'),
2336
# classifiers from http://pypi.python.org/pypi?%3Aaction=list_classifiers
2437
classifiers=["Development Status :: 4 - Beta",
2538
"Environment :: Plugins",

0 commit comments

Comments
 (0)