Browse Source

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 <Al.Bailey@windriver.com>
Change-Id: If904bd184e5aaa458393f3154abb6f9c5f0fb967
changes/56/821856/1
albailey 7 months ago
parent
commit
a72d8edca4
  1. 4
      bindep.txt
  2. 13
      test-requirements.txt
  3. 12
      tox.ini

4
bindep.txt

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

13
test-requirements.txt

@ -1,8 +1,13 @@
hacking>=2.0<2.1
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

12
tox.ini

@ -158,8 +158,9 @@ deps = -r{toxinidir}/test-requirements.txt
commands = bandit --ini tox.ini -r {toxinidir}/ -x '**/.tox/**,**/.eggs/**' -lll
[testenv:pylint]
# must set sitepackages to true in order to 'import rpm'
sitepackages=true
basepython = python2.7
deps = {[testenv]deps}
whitelist_externals = cp
find
tox
@ -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
[testenv:bindep]
# 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

Loading…
Cancel
Save