mirror of
https://github.com/bigchaindb/bigchaindb.git
synced 2024-06-25 18:56:44 +02: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
|
from setuptools import setup, find_packages
|
||||||
|
|
||||||
|
|
||||||
# get the version
|
# get the version
|
||||||
version = {}
|
version = {}
|
||||||
with open('bigchaindb/version.py') as fp:
|
with open('bigchaindb/version.py') as fp:
|
||||||
exec(fp.read(), version)
|
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 = [
|
tests_require = [
|
||||||
'pytest',
|
'pytest',
|
||||||
'coverage',
|
'coverage',
|
||||||
|
|
Loading…
Reference in New Issue
Block a user