mirror of
https://github.com/wassname/catalyst.git
synced 2026-07-16 11:18:11 +08:00
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:
@@ -9,3 +9,7 @@ requests==0.14.2
|
||||
# Linting
|
||||
|
||||
flake8==1.6.2
|
||||
|
||||
# Documentation Conversion
|
||||
|
||||
pyandoc==0.0.1
|
||||
|
||||
@@ -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',
|
||||
|
||||
Reference in New Issue
Block a user