We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent c492a46 commit 1f5b2a6Copy full SHA for 1f5b2a6
setup.py
@@ -7,19 +7,17 @@
7
8
long_description = ""
9
10
-try:
11
- long_description = pypandoc.convert('README.md', 'rst')
12
-except OSError as e:
13
- print("Pypandoc import failed, trying to download pancdoc...")
14
- pypandoc.download_pandoc()
15
-
16
-print("Trying to convert again...")
+print("Trying to download pandoc...")
+pypandoc.download_pandoc()
17
18
try:
19
long_description = pypandoc.convert('README.md', 'rst')
20
except OSError as e:
21
- print("Readme conversion failed.")
22
- 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()
23
24
# cv_version.py should be generated by running find_version.py
25
from cv_version import opencv_version
0 commit comments