diff --git a/etc/requirements_dev.txt b/etc/requirements_dev.txt index f82f8df5..aacc8b94 100644 --- a/etc/requirements_dev.txt +++ b/etc/requirements_dev.txt @@ -9,3 +9,7 @@ requests==0.14.2 # Linting flake8==1.6.2 + +# Documentation Conversion + +pyandoc==0.0.1 diff --git a/setup.py b/setup.py index ed61ecd2..4e8d7474 100644 --- a/setup.py +++ b/setup.py @@ -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',