1
0
mirror of https://github.com/bigchaindb/bigchaindb.git synced 2024-06-16 09:33:21 +02:00

Display useful message when setuptools is outdated

This commit is contained in:
vrde 2016-05-12 15:08:30 +02:00
parent fe93b376ca
commit 2c766d7bf2
No known key found for this signature in database
GPG Key ID: 6581C7C39B3D397D

View File

@ -6,11 +6,28 @@ For full docs visit https://bigchaindb.readthedocs.org
"""
from setuptools import setup, find_packages
# get the version
version = {}
with open('bigchaindb/version.py') as fp:
exec(fp.read(), version)
# check if setuptools is up to date
def check_setuptools_features():
import pkg_resources
try:
list(pkg_resources.parse_requirements('foo~=1.0'))
except pkg_resources.RequirementParseError:
exit('Your Python distribution comes with an incompatible version '
'of `setuptools`. Please run:\n'
' $ pip install --update setuptools\n'
'and then run this command again')
check_setuptools_features()
tests_require = [
'pytest',
'coverage',