You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@dlab.apache.org by lf...@apache.org on 2020/07/10 16:10:07 UTC
[incubator-dlab] 02/02: [DLAB-1748]: changed how new installed
dependencies are acquired for pip
This is an automated email from the ASF dual-hosted git repository.
lfrolov pushed a commit to branch DLAB-1748
in repository https://gitbox.apache.org/repos/asf/incubator-dlab.git
commit 744d146ebe0a9807dfa2f318898c897c73a27ec6
Author: leonidfrolov <fr...@gmail.com>
AuthorDate: Fri Jul 10 19:05:32 2020 +0300
[DLAB-1748]: changed how new installed dependencies are acquired for pip
---
infrastructure-provisioning/src/general/lib/os/fab.py | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/infrastructure-provisioning/src/general/lib/os/fab.py b/infrastructure-provisioning/src/general/lib/os/fab.py
index 7f80787..86814d2 100644
--- a/infrastructure-provisioning/src/general/lib/os/fab.py
+++ b/infrastructure-provisioning/src/general/lib/os/fab.py
@@ -66,7 +66,7 @@ def install_pip_pkg(requisites, pip_version, lib_group):
pip_pkg = pip_pkg[0]
else:
pip_pkg = "{}=={}".format(pip_pkg[0], pip_pkg[1])
- sudo('{0} install {1} --no-cache-dir 2>&1 | if ! grep -w -i -E "({2})" > /tmp/{0}install_{1}.log; then echo "" > /tmp/{0}install_{1}.log;fi'.format(pip_version, pip_pkg, error_parser))
+ sudo('{0} install {1} --no-cache-dir 2>&1 | tee /tmp/tee.tmp; if ! grep -w -i -E "({2})" /tmp/tee.tmp > /tmp/{0}install_{1}.log; then echo "" > /tmp/{0}install_{1}.log;fi'.format(pip_version, pip_pkg, error_parser))
err = sudo('cat /tmp/{0}install_{1}.log'.format(pip_version, pip_pkg)).replace('"', "'")
sudo('{0} freeze | if ! grep -w -i {1} > /tmp/{0}install_{1}.list; then echo "" > /tmp/{0}install_{1}.list;fi'.format(pip_version, pip_pkg))
res = sudo('cat /tmp/{0}install_{1}.list'.format(pip_version, pip_pkg))
@@ -87,8 +87,7 @@ def install_pip_pkg(requisites, pip_version, lib_group):
version = \
[i for i in ver if pip_pkg.split("==")[0].lower() in i][0].split(
'==')[1]
- dep = sudo('{0} show {1} 2>&1 | grep "Requires: "'.format(pip_version, pip_pkg.split("==")[0])).replace(
- '\r', '').replace('\n', '').replace('Requires:', '').strip()
+ dep = sudo('cat /tmp/tee.tmp | grep "Installing collected packages: "').replace('\r\n', '').replace(pip_pkg[0], '').strip()
if dep == '':
dep = []
else:
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@dlab.apache.org
For additional commands, e-mail: commits-help@dlab.apache.org