Converts README.md file to ReST for setup's long_description.

So that we can have one README.md in source control, but have
a README that is compatible with PyPI.

Adds pyandoc on which the doc conversion depends.
This commit is contained in:
Eddie Hebert
2012-11-26 14:48:03 -05:00
parent 0ccdaa9f7c
commit 4d0303cc75
2 changed files with 19 additions and 1 deletions
+4
View File
@@ -9,3 +9,7 @@ requests==0.14.2
# Linting
flake8==1.6.2
# Documentation Conversion
pyandoc==0.0.1
+15 -1
View File
@@ -14,8 +14,22 @@
# See the License for the specific language governing permissions and
# limitations under the License.
import pandoc
pandoc.core.PANDOC_PATH = 'pandoc'
from setuptools import setup, find_packages
def readme_as_rest():
"""
Converts the README.md file to ReST, since PyPI uses ReST for formatting,
This allows to have one canonical README file, being the README.md
"""
doc = pandoc.Document()
with open('README.md').read() as markdown_source:
doc.markdown = markdown_source
return doc.rst
setup(
name='zipline',
version='0.5.3',
@@ -23,7 +37,7 @@ setup(
author='Quantopian Inc.',
author_email='opensource@quantopian.com',
packages=find_packages(),
long_description=open('README.md').read(),
long_description=readme_as_rest(),
license='Apache 2.0',
classifiers=[
'Development Status :: 4 - Beta',