提交 1f5b2a67 编写于 作者: O Olli-Pekka Heinisuo

change the pandoc download logic

上级 c492a461
......@@ -7,19 +7,17 @@ import pypandoc
long_description = ""
try:
long_description = pypandoc.convert('README.md', 'rst')
except OSError as e:
print("Pypandoc import failed, trying to download pancdoc...")
pypandoc.download_pandoc()
print("Trying to convert again...")
print("Trying to download pandoc...")
pypandoc.download_pandoc()
try:
long_description = pypandoc.convert('README.md', 'rst')
except OSError as e:
print("Readme conversion failed.")
sys.exit(1)
print("Pandoc not found.")
import io
# pandoc is not installed, fallback to using raw contents
with io.open('README.md', encoding="utf-8") as f:
long_description = f.read()
# cv_version.py should be generated by running find_version.py
from cv_version import opencv_version
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册