mirror of
https://github.com/SheffieldML/GPy.git
synced 2026-05-27 14:25:16 +02:00
[readtorst] rst was not returned before
This commit is contained in:
parent
92d3df51a5
commit
bc84d89b7d
3 changed files with 20 additions and 23 deletions
10
setup.py
10
setup.py
|
|
@ -39,20 +39,16 @@ import os
|
|||
import sys
|
||||
from setuptools import setup, Extension
|
||||
import numpy as np
|
||||
|
||||
import codecs
|
||||
|
||||
def read(fname):
|
||||
import codecs
|
||||
with codecs.open(fname, 'r', 'utf-8') as f:
|
||||
return f.read()
|
||||
|
||||
def read_to_rst(fname):
|
||||
def read_readme(fname):
|
||||
try:
|
||||
import pypandoc
|
||||
#print 'Warning in installation: For rst formatting in pypi, consider installing pypandoc for conversion'
|
||||
#with open('README.rst', 'w') as f:
|
||||
# f.write(pypandoc.convert('README.md', 'rst'))
|
||||
pypandoc.convert('README.md', 'rst', outputfile='README.rst')
|
||||
return pypandoc.convert(read(fname), 'rst')
|
||||
except ImportError:
|
||||
return read(fname)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue