Hello,
while preparing one of our package (pyfai), we endup with an FTBFS due to
backports.functools_lru_cache [1].
here the backtrace
Traceback (most recent call last):
File "./run_tests.py", line 543, in
unittest.defaultTestLoader.loadTestsFromNames(options.test_name))
File "/usr/lib/python2.7/unittest/loader.py", line 130, in loadTestsFromNames
suites = [self.loadTestsFromName(name, module) for name in names]
File "/usr/lib/python2.7/unittest/loader.py", line 115, in loadTestsFromName
test = obj()
File
"/<>/pyfai-0.17.0+dfsg1/.pybuild/cpython2_2.7_pyfai/build/pyFAI/test/__init__.py",
line 50, in suite
from . import test_all
File
"/<>/pyfai-0.17.0+dfsg1/.pybuild/cpython2_2.7_pyfai/build/pyFAI/test/test_all.py",
line 50, in
from . import test_peak_picking
File
"/<>/pyfai-0.17.0+dfsg1/.pybuild/cpython2_2.7_pyfai/build/pyFAI/test/test_peak_picking.py",
line 48, in
from ..gui.peak_picker import PeakPicker
File
"/<>/pyfai-0.17.0+dfsg1/.pybuild/cpython2_2.7_pyfai/build/pyFAI/gui/peak_picker.py",
line 59, in
from .utils import update_fig, maximize_fig
File
"/<>/pyfai-0.17.0+dfsg1/.pybuild/cpython2_2.7_pyfai/build/pyFAI/gui/utils/__init__.py",
line 41, in
from .. import matplotlib
File
"/<>/pyfai-0.17.0+dfsg1/.pybuild/cpython2_2.7_pyfai/build/pyFAI/gui/matplotlib.py",
line 48, in
import matplotlib
File "/usr/lib/python2.7/dist-packages/matplotlib/__init__.py", line 130, in
from matplotlib.rcsetup import defaultParams, validate_backend, cycler
File "/usr/lib/python2.7/dist-packages/matplotlib/rcsetup.py", line 29, in
from matplotlib.fontconfig_pattern import parse_fontconfig_pattern
File "/usr/lib/python2.7/dist-packages/matplotlib/fontconfig_pattern.py",
line 28, in
from backports.functools_lru_cache import lru_cache
ImportError: No module named backports.functools_lru_cache
so we tried in a clean chroot, a simple
import backports.functools_lru_cache
which end-up with
~# python -c "import backports.functools_lru_cache; print
backports.functools_lru_cache"
Traceback (most recent call last):
File "", line 1, in
ImportError: No module named backports.functools_lru_cache
If we add an __init__.py file under
(unstable-amd64-sbuild)root@diffabs6:/usr/lib/python2.7/dist-packages/backports#
touch __init__.py
then it works
# python -c "import backports.functools_lru_cache; print
backports.functools_lru_cache"
So the question is: who is in charge of this __init__.py file ?
if I look in the rules[2] file of backports.fucntools... package we can see
this:
override_dh_auto_install:
dh_auto_install
rm -rf
$(CURDIR)/debian/*/usr/lib/python2.7/dist-packages/backports/__init__.py
override_dh_python2:
dh_python2 --namespace backports
the changelog[3][4] is even more explicite, explaining that dh_python2 is now
in charge of the backports namespace.
Is there a bug in the dh_python2 namespace machinery or in the
backports.func... package ?
thanks for your attention.
Frédéric
[1] https://tracker.debian.org/pkg/backports.functools-lru-cache
[2]
https://tracker.debian.org/media/packages/b/backports.functools-lru-cache/rules-1.5-1
[3]
https://tracker.debian.org/media/packages/b/backports.functools-lru-cache/changelog-1.5-1
[4] https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=884690