Merge branch 'more-explicit-error-reporting-for-pkg_resources'

This commit is contained in:
vrde 2016-05-19 11:42:03 +02:00
commit b1101747c0
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 ValueError:
exit('Your Python distribution comes with an incompatible version '
'of `setuptools`. Please run:\n'
' $ pip3 install --upgrade setuptools\n'
'and then run this command again')
check_setuptools_features()
tests_require = [
'pytest',
'coverage',