Fail hard during publish if pandoc isn't available.

This commit is contained in:
Xavier Ordoquy 2016-02-12 13:43:18 +01:00
parent 72ecd32c6b
commit f48ccad581

View File

@ -56,6 +56,10 @@ version = get_version('rest_framework')
if sys.argv[-1] == 'publish': if sys.argv[-1] == 'publish':
try:
import pypandoc
except ImportError:
print("pypandoc not installed.\nUse `pip install pypandoc`.\nExiting.")
if os.system("pip freeze | grep wheel"): if os.system("pip freeze | grep wheel"):
print("wheel not installed.\nUse `pip install wheel`.\nExiting.") print("wheel not installed.\nUse `pip install wheel`.\nExiting.")
sys.exit() sys.exit()