File tree Expand file tree Collapse file tree 1 file changed +7
-11
lines changed Expand file tree Collapse file tree 1 file changed +7
-11
lines changed Original file line number Diff line number Diff line change 6
6
7
7
from setuptools import setup
8
8
9
- if sys . argv [ - 1 ] == 'publish' :
9
+ def get_long_description ( f ) :
10
10
try :
11
11
import pypandoc
12
12
except ImportError :
13
- print ("pypandoc not installed.\n Use `pip install pypandoc`.\n Exiting." )
14
- sys .exit (1 )
15
-
16
- def get_long_description (f ):
17
- """
18
- Converts md file to rst text
19
- """
20
- try :
21
- return pypandoc .convert (f , 'rst' )
22
- except NameError :
23
13
return 'No description'
14
+ return pypandoc .convert (f , 'rst' )
24
15
25
16
install_requires = [
26
17
'aiopg==0.10.0' ,
@@ -85,6 +76,11 @@ def get_package_data(package):
85
76
version = get_version ('tcrudge' )
86
77
87
78
if sys .argv [- 1 ] == 'publish' :
79
+ try :
80
+ import pypandoc
81
+ except ImportError :
82
+ print ("pypandoc not installed.\n Use `pip install pypandoc`.\n Exiting." )
83
+ sys .exit (1 )
88
84
pypandoc .download_pandoc ()
89
85
if os .system ("pip freeze | grep twine" ):
90
86
print ("twine not installed.\n Use `pip install twine`.\n Exiting." )
You can’t perform that action at this time.
0 commit comments