Skip to content

Commit acab42a

Browse files
Merge pull request #1523 from craigcomstock/ENT-12432/master
Added check for psycopg2 python module for nova/tests/reporting
2 parents 53d0583 + 9535dc9 commit acab42a

2 files changed

Lines changed: 13 additions & 1 deletion

File tree

build-scripts/build-environment-check

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,14 @@ do
6464
fi
6565
done
6666

67+
if [ "$PROJECT" = "nova" ]; then
68+
. "$BASEDIR"/nova/tests/reporting/find-python.sh # to get PYTHON as the tests do
69+
if ! $PYTHON -m pip list | grep psycopg2; then
70+
echo "nova/tests/reporting needs psycopg2 module installed for python: $PYTHON"
71+
RET=1
72+
fi
73+
fi
74+
6775

6876
# Exit with the right exit code
6977
if [ $RET = 0 ]

ci/cfengine-build-host-setup.cf

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,9 +83,13 @@ bundle agent cfengine_build_host_setup
8383
"pkgconfig";
8484
"perl-IPC-Cmd";
8585
"perl-devel";
86-
"python-psycopg2";
8786
"xfsprogs";
8887

88+
(redhat_6|centos_6).(yum_dnf_conf_ok)::
89+
"python-psycopg2" comment => "centos-6 provides python2 and psycopg2 for python2 as a package";
90+
(redhat_7|centos_7).(yum_dnf_conf_ok)::
91+
"python3-psycopg2";
92+
8993
# note that shellcheck, fakeroot and ccache require epel-release to be installed
9094
(redhat_7|centos_7).(yum_dnf_conf_ok)::
9195
"epel-release";

0 commit comments

Comments
 (0)