Bug#884181: autodep8: Fix autopkgtest-pkg-python module import test for python{3}-oslo.*

James Page james.page at ubuntu.com
Tue Dec 12 12:22:38 UTC 2017

Package: autodep8
Version: 0.9
Severity: normal

Dear Maintainer,

The Oslo python modules from the OpenStack project are all names oslo.{X}, but the
internal module naming is oslo_{X}.  As a result the standard autopkgtest-pkg-python
module import test fails (as it generates oslo.{X} as the module name).

I've attached a patch that automatically remaps oslo. -> oslo_ which I think will
resolve this issue.



-- System Information:
Debian Release: buster/sid
  APT prefers bionic
  APT policy: (500, 'bionic')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 4.13.0-16-generic (SMP w/4 CPU cores)
Locale: LANG=en_GB.UTF-8, LC_CTYPE=en_GB.UTF-8 (charmap=UTF-8), LANGUAGE=en_GB:en (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)

Versions of packages autodep8 depends on:
ii  dctrl-tools  2.24-2build1
ii  python3      3.6.3-0ubuntu2

autodep8 recommends no packages.

autodep8 suggests no packages.

-- no debconf information
-------------- next part --------------
diff -Nru autodep8-0.10/support/python/generate autodep8-0.10ubuntu1/support/python/generate
--- autodep8-0.10/support/python/generate	2017-09-01 15:55:23.000000000 +0100
+++ autodep8-0.10ubuntu1/support/python/generate	2017-12-12 12:07:23.000000000 +0000
@@ -56,7 +56,7 @@
-module=$(echo "$module" | sed 's/-/_/g')
+module=$(echo "$module" | sed -e 's/-/_/g' -e 's/oslo\./oslo_/g')
 # Python2
 if [ -n "$py2_package" ]; then

More information about the autopkgtest-devel mailing list