Skip to content

Commit 2dac971

Browse files
author
avandras
committed
Update install_deps.py
1 parent 9766001 commit 2dac971

File tree

1 file changed

+11
-9
lines changed

1 file changed

+11
-9
lines changed

.github/workflows/install_deps.py

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -9,30 +9,32 @@
99

1010

1111
def install_requirements(what):
12+
subprocess.call([sys.executable, '-m', 'pip', 'install', '--upgrade', 'pip'])
13+
s = subprocess.call([sys.executable, '-m', 'pip', 'install', '--upgrade', 'wheel', 'setuptools'])
14+
if s != 0:
15+
return s
16+
1217
old_path = sys.path[:]
1318
w = os.path.join(os.getcwd(), os.path.dirname(inspect.getfile(inspect.currentframe())))
1419
sys.path.insert(0, os.path.dirname(os.path.dirname(w)))
1520
try:
1621
from setup import EXTRAS_REQUIRE, read
1722
finally:
1823
sys.path = old_path
19-
requirements = ['mock>=2.0.0', 'flake8', 'pytest', 'pytest-cov'] if what == 'all' else ['behave']
24+
requirements = ['flake8', 'pytest', 'pytest-cov'] if what == 'all' else ['behave']
2025
requirements += ['coverage']
2126
# try to split tests between psycopg2 and psycopg3
2227
requirements += ['psycopg[binary]'] if sys.version_info >= (3, 8, 0) and\
23-
(sys.platform != 'darwin' or what == 'etcd3') else ['psycopg2-binary']
28+
(sys.platform != 'darwin' or what == 'etcd3') else ['psycopg2-binary==2.9.9'
29+
if sys.platform == 'darwin' else 'psycopg2-binary']
2430
for r in read('requirements.txt').split('\n'):
2531
r = r.strip()
2632
if r != '':
2733
extras = {e for e, v in EXTRAS_REQUIRE.items() if v and any(r.startswith(x) for x in v)}
2834
if not extras or what == 'all' or what in extras:
2935
requirements.append(r)
3036

31-
subprocess.call([sys.executable, '-m', 'pip', 'install', '--upgrade', 'pip'])
32-
subprocess.call([sys.executable, '-m', 'pip', 'install', '--upgrade', 'wheel'])
33-
r = subprocess.call([sys.executable, '-m', 'pip', 'install'] + requirements)
34-
s = subprocess.call([sys.executable, '-m', 'pip', 'install', '--upgrade', 'setuptools'])
35-
return s | r
37+
return subprocess.call([sys.executable, '-m', 'pip', 'install'] + requirements)
3638

3739

3840
def install_packages(what):
@@ -45,7 +47,7 @@ def install_packages(what):
4547
packages['exhibitor'] = packages['zookeeper']
4648
packages = packages.get(what, [])
4749
ver = versions.get(what)
48-
if float(ver) >= 15:
50+
if 15 <= float(ver) < 17:
4951
packages += ['postgresql-{0}-citus-12.1'.format(ver)]
5052
subprocess.call(['sudo', 'apt-get', 'update', '-y'])
5153
return subprocess.call(['sudo', 'apt-get', 'install', '-y', 'postgresql-' + ver, 'expect-dev'] + packages)
@@ -142,4 +144,4 @@ def main():
142144

143145

144146
if __name__ == '__main__':
145-
sys.exit(main())
147+
sys.exit(main())

0 commit comments

Comments
 (0)