From 44cd1fd7e1a9bb8a9315086aa0b171dbdbbf34f3 Mon Sep 17 00:00:00 2001 From: nvbn Date: Mon, 27 Jul 2015 23:31:06 +0300 Subject: [PATCH] #311 Fix installation without pandoc --- release.py | 6 +++++- setup.py | 9 +++++---- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/release.py b/release.py index 85af928..42cf2b3 100755 --- a/release.py +++ b/release.py @@ -1,5 +1,6 @@ #!/usr/bin/env python from subprocess import call +import os import re @@ -28,4 +29,7 @@ call('git commit -am "Bump to {}"'.format(version), shell=True) call('git tag {}'.format(version), shell=True) call('git push', shell=True) call('git push --tags', shell=True) -call('python setup.py sdist bdist_wheel upload', shell=True) + +env = os.environ +env['CONVERT_README'] = 'true' +call('python setup.py sdist bdist_wheel upload', shell=True, env=env) diff --git a/setup.py b/setup.py index 92a2d97..bdfcbf6 100755 --- a/setup.py +++ b/setup.py @@ -1,13 +1,14 @@ #!/usr/bin/env python from setuptools import setup, find_packages import sys +import os -try: +if os.environ.get('CONVERT_README'): import pypandoc long_description = pypandoc.convert('README.md', 'rst') -except: - long_description = open('README.md').read() +else: + long_description = '' version = sys.version_info[:2] if version < (2, 7): @@ -19,7 +20,7 @@ elif (3, 0) < version < (3, 3): ' ({}.{} detected).'.format(*version)) sys.exit(-1) -VERSION = '2.5.4' +VERSION = '2.5.6' install_requires = ['psutil', 'colorama', 'six'] extras_require = {':python_version<"3.4"': ['pathlib']}