mirror of
https://github.com/outbackdingo/patroni.git
synced 2026-01-27 02:20:01 +00:00
Limit py-consul version depending on python version (#3336)
Latest release is incompatible with python < 3.9
This commit is contained in:
committed by
GitHub
parent
1ba9e68b4b
commit
32934b205f
15
.github/workflows/install_deps.py
vendored
15
.github/workflows/install_deps.py
vendored
@@ -27,12 +27,17 @@ def install_requirements(what):
|
||||
requirements += ['psycopg[binary]'] if sys.version_info >= (3, 8, 0) and\
|
||||
(sys.platform != 'darwin' or what == 'etcd3') else ['psycopg2-binary==2.9.9'
|
||||
if sys.platform == 'darwin' else 'psycopg2-binary']
|
||||
|
||||
from pip._vendor.distlib.markers import evaluator, DEFAULT_CONTEXT
|
||||
from pip._vendor.distlib.util import parse_requirement
|
||||
|
||||
for r in read('requirements.txt').split('\n'):
|
||||
r = r.strip()
|
||||
if r != '':
|
||||
extras = {e for e, v in EXTRAS_REQUIRE.items() if v and any(r.startswith(x) for x in v)}
|
||||
if not extras or what == 'all' or what in extras:
|
||||
requirements.append(r)
|
||||
r = parse_requirement(r)
|
||||
if not r or r.marker and not evaluator.evaluate(r.marker, DEFAULT_CONTEXT):
|
||||
continue
|
||||
extras = {e for e, v in EXTRAS_REQUIRE.items() if v and any(r.requirement.startswith(x) for x in v)}
|
||||
if not extras or what == 'all' or what in extras:
|
||||
requirements.append(r.requirement)
|
||||
|
||||
return subprocess.call([sys.executable, '-m', 'pip', 'install'] + requirements)
|
||||
|
||||
|
||||
@@ -3,7 +3,9 @@ boto3
|
||||
PyYAML
|
||||
kazoo>=1.3.1
|
||||
python-etcd>=0.4.3,<0.5
|
||||
py-consul>=1.1.1
|
||||
py-consul>=1.1.1,<1.5.4; python_version=="3.6"
|
||||
py-consul>=1.1.1,<1.6.0; python_version>"3.6" and python_version<"3.9"
|
||||
py-consul>=1.1.1; python_version>="3.9"
|
||||
click>=4.1
|
||||
prettytable>=0.7
|
||||
python-dateutil
|
||||
|
||||
Reference in New Issue
Block a user