Pin zeroconf dependency on 0.19 to maintain python 2 compatibility #1293

This commit is contained in:
nicolargo 2018-08-05 09:52:52 +02:00
parent fa323bb181
commit caf0b28f2b

View File

@ -13,6 +13,9 @@ if sys.version_info < (2, 7) or (3, 0) <= sys.version_info < (3, 4):
print('Glances requires at least Python 2.7 or 3.4 to run.') print('Glances requires at least Python 2.7 or 3.4 to run.')
sys.exit(1) sys.exit(1)
PY2 = sys.version_info[0] == 2
PY3 = sys.version_info[0] == 3
# Global functions # Global functions
################## ##################
@ -80,7 +83,8 @@ setup(
install_requires=get_install_requires(), install_requires=get_install_requires(),
extras_require={ extras_require={
'action': ['pystache'], 'action': ['pystache'],
'browser': ['zeroconf>=0.17'], # Zeroconf 0.19.1 is the latest one compatible with Python 2 (issue #1293)
'browser': ['zeroconf==0.19.1' if PY2 else 'zeroconf>=0.19.1'],
'cloud': ['requests'], 'cloud': ['requests'],
'cpuinfo': ['py-cpuinfo'], 'cpuinfo': ['py-cpuinfo'],
'docker': ['docker>=2.0.0'], 'docker': ['docker>=2.0.0'],