nodepool: elements: infra-package-needs: Install core python modules on openSUSE

openSUSE packages core python2 modules like the xml one in a separate
package called python-xml. Similarly, python3 contains the base modules
in python3-base and the xml one in python3. As such it's best to ensure
that both python-xml and python3 are installed similar to
I5cd5d1127ae62d6753c2ace44965179c5400bb9a

Also, update bindep.txt to include python3-devel and
python-xml for SUSE distros.

This is supposed to fix python3 related failures on openSUSE jobs such
as the following one:

2017-06-28 13:00:47.628446 | + virtualenv -p python3 env
2017-06-28 13:00:47.926042 | Using base prefix '/usr'
2017-06-28 13:00:47.926098 | New python executable in /home/jenkins/env/bin/python3
2017-06-28 13:00:47.926117 | Also creating executable in /home/jenkins/env/bin/python
2017-06-28 13:00:47.926144 | Please make sure you remove any previous custom paths from your /home/jenkins/.pydistutils.cfg file.
2017-06-28 13:00:48.303569 | Installing setuptools, pip, wheel...
2017-06-28 13:00:48.303705 |   Complete output from command /home/jenkins/env/bin/python3 - setuptools pip wheel:
2017-06-28 13:00:48.303733 |   Traceback (most recent call last):
2017-06-28 13:00:48.303748 |   File "<stdin>", line 7, in <module>
2017-06-28 13:00:48.303782 |   File "/usr/lib/python2.7/site-packages/virtualenv_support/pip-9.0.1-py2.py3-none-any.whl/pip/__init__.py", line 26, in <module>
2017-06-28 13:00:48.303816 |   File "/usr/lib/python2.7/site-packages/virtualenv_support/pip-9.0.1-py2.py3-none-any.whl/pip/utils/__init__.py", line 27, in <module>
2017-06-28 13:00:48.303868 |   File "/usr/lib/python2.7/site-packages/virtualenv_support/pip-9.0.1-py2.py3-none-any.whl/pip/_vendor/pkg_resources/__init__.py", line 35, in <module>
2017-06-28 13:00:48.303904 |   File "/usr/lib64/python3.4/plistlib.py", line 65, in <module>
2017-06-28 13:00:48.303920 |     from xml.parsers.expat import ParserCreate
2017-06-28 13:00:48.303932 | ImportError: No module named 'xml'

Change-Id: I32899793a78464e25aec0e213eee9c65bd915a51
This commit is contained in:
Markos Chandras 2017-06-28 22:36:45 +01:00
parent da5152c71c
commit ba3fe3678f
3 changed files with 17 additions and 2 deletions

View File

@ -100,7 +100,14 @@ dev-python/pyzmq [platform:gentoo]
# both here for documentary purpose.
python3-all [platform:dpkg]
python3-all-dev [platform:dpkg]
python3-devel [platform:fedora]
python3-devel [platform:fedora platform:suse]
# python3-devel does not pull in the python3 package on openSUSE so
# we need to be explicit. The python3 package contains the XML module
# which is required by a python3 virtualenv. Similarly, in python2,
# the XML module is located in python-xml which is not pulled in
# by python-devel as well. See https://bugzilla.suse.com/show_bug.cgi?id=1046990
python3 [platform:suse]
python-xml [platform:suse]
redis [platform:rpm]
redis-server [platform:dpkg]
dev-db/redis [platform:gentoo]

View File

@ -2,8 +2,12 @@ coreutils:
cron:
util-linux:
build-essential:
python-xml:
phase: pre-install.d
python-dev:
python3-dev:
python3:
phase: pre-install.d
uuid-runtime:
traceroute:
ntp:

View File

@ -41,8 +41,10 @@
"git": "git-core",
"iputils-ping": "iputils",
"ntpdate": "",
"python-xml": "python-xml",
"python-dev": "python-devel",
"python3-dev": "python3-devel",
"python3": "python3",
"iptables": "iptables SuSEfirewall2",
"uuid-runtime": "uuidd"
}
@ -53,6 +55,8 @@
"gentoolkit": "",
"centos-release-openstack-ocata": "",
"redhat-rpm-config": "",
"redhat-lsb-core": ""
"redhat-lsb-core": "",
"python-xml": "",
"python3": ""
}
}