File tree 1 file changed +14
-10
lines changed
1 file changed +14
-10
lines changed Original file line number Diff line number Diff line change 2
2
# coding=utf-8
3
3
4
4
import sys
5
-
6
- try :
7
- import pypandoc
8
- except ImportError :
9
- print "The \" pypandoc\" package and the pandoc binary on your system " \
10
- "need to be present to run setuptools."
11
- sys .exit (1 )
12
-
13
-
14
5
from setuptools import setup
15
6
from gitver .version import gitver_version , gitver_pypi
16
7
8
+ make_sdist = len ({'sdist' , 'build' } & set (sys .argv )) > 0
9
+
17
10
try :
18
11
import gitver ._version_next as next
19
12
vtype = '(NEXT)'
22
15
23
16
24
17
def readme ():
25
- return pypandoc .convert ('README.md' , 'rst' )
18
+ if make_sdist :
19
+ try :
20
+ import pypandoc
21
+ return pypandoc .convert ('README.md' , 'rst' )
22
+ except ImportError :
23
+ print "Warning: the \" pypandoc\" package and/or the pandoc " \
24
+ "binary can't be found on your system: if you want to " \
25
+ "generate the README.rst for PyPI you'll need to install " \
26
+ "them properly, else a fallback description will be used."
27
+
28
+ # falling back to a simple description
29
+ return 'Simple version string management for git'
26
30
27
31
28
32
def requirements ():
You can’t perform that action at this time.
0 commit comments