mirror of
https://github.com/bigchaindb/bigchaindb.git
synced 2024-10-13 13:34:05 +00:00
Display useful message when setuptools is outdated
This commit is contained in:
parent
fe93b376ca
commit
2c766d7bf2
17
setup.py
17
setup.py
@ -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',
|
||||
|
Loading…
x
Reference in New Issue
Block a user