File tree Expand file tree Collapse file tree 1 file changed +7
-9
lines changed Expand file tree Collapse file tree 1 file changed +7
-9
lines changed Original file line number Diff line number Diff line change 7
7
8
8
long_description = ""
9
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..." )
10
+ print ("Trying to download pandoc..." )
11
+ pypandoc .download_pandoc ()
17
12
18
13
try :
19
14
long_description = pypandoc .convert ('README.md' , 'rst' )
20
15
except OSError as e :
21
- print ("Readme conversion failed." )
22
- sys .exit (1 )
16
+ print ("Pandoc not found." )
17
+ import io
18
+ # pandoc is not installed, fallback to using raw contents
19
+ with io .open ('README.md' , encoding = "utf-8" ) as f :
20
+ long_description = f .read ()
23
21
24
22
# cv_version.py should be generated by running find_version.py
25
23
from cv_version import opencv_version
You can’t perform that action at this time.
0 commit comments