Adding rpm-python to bindep to fix pylint

Tox pylint target fails when it cannot 'import rpm'.
There is no pypi package that provides that, since the
centos rpm-python is meant to be installed on the host.

Adding the bindep entry for rpm-python, which the
zuul job will use to prepare the zuul worker host
to properly provide the necessary rpm.

Story: 2008943
Task: 44183
Signed-off-by: albailey <>
Change-Id: If904bd184e5aaa458393f3154abb6f9c5f0fb967
albailey 2021-12-14 09:37:23 -06:00
parent 0131cd569c
commit a72d8edca4
3 changed files with 24 additions and 5 deletions

bindep.txt Normal file
View File

@ -0,0 +1,4 @@
# This is a cross-platform list tracking distribution packages needed for install and tests;
# see for additional information.
rpm-python [platform:rpm]

View File

@ -1,8 +1,13 @@
pycodestyle>=2.0.0 # MIT License
# The order of packages is significant, because pip processes them in the order
# of appearance.
# always put 'hacking' first. it pulls in flake8, etc..
hacking>=1.1.0,<=2.0.0 # Apache-2.0
astroid<2.0;python_version<"3.0" # GPLv2
astroid<= 2.2.5;python_version>="3.0" # GPLv2
mock>=2.0.0 # BSD
bandit>=1.1.0,<1.6.3 # Apache-2.0
bashate >= 0.2
pylint<2.1.0;python_version<"3.0" # GPLv2
pylint<2.4.0;python_version>="3.0" # GPLv2
PyYAML >= 3.1.0
yamllint >= 0.5.2
yamllint<1.26.1;python_version>="3.0" # GPLv2

View File

@ -158,8 +158,9 @@ deps = -r{toxinidir}/test-requirements.txt
commands = bandit --ini tox.ini -r {toxinidir}/ -x '**/.tox/**,**/.eggs/**' -lll
# must set sitepackages to true in order to 'import rpm'
basepython = python2.7
deps = {[testenv]deps}
whitelist_externals = cp
@ -212,3 +213,12 @@ commands =
rm -rf api-ref/build
sphinx-build -W -b html -d api-ref/build/doctrees api-ref/source api-ref/build/html
whitelist_externals = rm
# Do not install any requirements. We want this to be fast and work even if
# system dependencies are missing, since it's used to tell you what system
# dependencies are missing! This also means that bindep must be installed
# separately, outside of the requirements files.
skip_install = True
deps = bindep
commands = bindep test