1
0
mirror of https://github.com/nvbn/thefuck.git synced 2025-01-19 04:21:14 +00:00

Merge pull request #525 from tdsmith/patch-1

Avoid importing pip
This commit is contained in:
Vladimir Iakovlev 2016-06-29 14:11:26 +03:00 committed by GitHub
commit 965c05bfdf

View File

@ -1,13 +1,16 @@
#!/usr/bin/env python
from setuptools import setup, find_packages
import pip
import pkg_resources
import sys
import os
if int(pip.__version__.split('.')[0]) < 6:
print('pip older than 6.0 not supported, please upgrade pip with:\n\n'
' pip install -U pip')
sys.exit(-1)
try:
if int(pkg_resources.get_distribution("pip").version.split('.')[0]) < 6:
print('pip older than 6.0 not supported, please upgrade pip with:\n\n'
' pip install -U pip')
sys.exit(-1)
except pkg_resources.DistributionNotFound:
pass
if os.environ.get('CONVERT_README'):
import pypandoc