From ba3fe3678fbceab2556596570006f71e2e6e016f Mon Sep 17 00:00:00 2001 From: Markos Chandras Date: Wed, 28 Jun 2017 22:36:45 +0100 Subject: [PATCH] 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 "", line 7, in 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 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 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 2017-06-28 13:00:48.303904 | File "/usr/lib64/python3.4/plistlib.py", line 65, in 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 --- jenkins/data/bindep-fallback.txt | 9 ++++++++- .../elements/infra-package-needs/package-installs.yaml | 4 ++++ nodepool/elements/infra-package-needs/pkg-map | 6 +++++- 3 files changed, 17 insertions(+), 2 deletions(-) diff --git a/jenkins/data/bindep-fallback.txt b/jenkins/data/bindep-fallback.txt index 4a12062aaf..5597ccba8b 100644 --- a/jenkins/data/bindep-fallback.txt +++ b/jenkins/data/bindep-fallback.txt @@ -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] diff --git a/nodepool/elements/infra-package-needs/package-installs.yaml b/nodepool/elements/infra-package-needs/package-installs.yaml index 8ea49303b4..d6572eb423 100644 --- a/nodepool/elements/infra-package-needs/package-installs.yaml +++ b/nodepool/elements/infra-package-needs/package-installs.yaml @@ -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: diff --git a/nodepool/elements/infra-package-needs/pkg-map b/nodepool/elements/infra-package-needs/pkg-map index bd249481e8..2c52939f21 100644 --- a/nodepool/elements/infra-package-needs/pkg-map +++ b/nodepool/elements/infra-package-needs/pkg-map @@ -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": "" } }