Skip to content

Commit d06feae

Browse files
committed
DOC: pipe README.rst contents into long_description, for PyPI frontpage
1 parent e9f6532 commit d06feae

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

setup.py

Lines changed: 10 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,20 @@
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+
return open(os.path.join(os.path.dirname(__file__), fname)).read()
25+
26+
1827
setup(
1928
name="numpydoc",
2029
packages=["numpydoc"],
2130
version=version,
2231
description="Sphinx extension to support docstrings in Numpy format",
32+
long_description=read('README.rst'),
2333
# classifiers from http://pypi.python.org/pypi?%3Aaction=list_classifiers
2434
classifiers=["Development Status :: 4 - Beta",
2535
"Environment :: Plugins",

0 commit comments

Comments
 (0)