Path: csiph.com!aioe.org!bofh.it!news.nic.it!robomod From: PICCA Frederic-Emmanuel Newsgroups: linux.debian.maint.python Subject: dh_python2 namespace issue ? Date: Wed, 09 Jan 2019 12:00:01 +0100 Message-ID: X-Mailbox-Line: From debian-python-request@lists.debian.org Wed Jan 9 10:51:08 2019 Old-Return-Path: X-Amavis-Spam-Status: No, score=-0.2 tagged_above=-10000 required=5.3 tests=[BAYES_00=-2, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, THREADTOPIC=2] autolearn=no autolearn_force=no X-Policyd-Weight: using cached result; rate: -4.6 X-Greylist: delayed 360 seconds by postgrey-1.36 at bendel; Wed, 09 Jan 2019 10:33:45 UTC Dkim-Filter: OpenDKIM Filter v2.11.0 brouette.synchrotron-soleil.fr C12B37000E7 Dkim-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=synchrotron-soleil.fr; s=email; t=1547029662; bh=jWlygPpfYilurY96/9lAJpyTfY3spLaNp84qPGiKNdw=; h=From:To:CC:Subject:Date:From; b=JWy2ftcBcXFYDDUD7EZBX9CrBOEzEwsh7chfoZjInZIA4K45WNQf/Bq0aPpPoX9qC QSkngvPP7ksG+2VZVu8947EfnlkJGa4jjuas7f55l73ZUcjrjSOhSoaq6eJ9kGo8SP ZgAaMlY7qga9XWwJV6UZGcc25syh0eSNWSjjHauM= Dkim-Filter: OpenDKIM Filter v2.11.0 brouette.synchrotron-soleil.fr 9D8E07000E5 Dkim-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=synchrotron-soleil.fr; s=email; t=1547029661; bh=jWlygPpfYilurY96/9lAJpyTfY3spLaNp84qPGiKNdw=; h=From:To:CC:Subject:Date:From; b=JOfZJ20+q0vHUs1qyERiB6Dwwi5YCi27Al69ioB9ag5QWtx/VvxfdkLxBEmzUb5vZ pT0zm79zdhfKEsPhVYLpct9BafnLbMV28CwSxbavb1cTSgHERmBZr9oFNXmbHKkZTY o8vAu5DgZisnABlGLZZLyiSCT+sxknsiCHIxdHxw= Thread-Topic: dh_python2 namespace issue ? Thread-Index: AdSoBCixyCRObqVNRAOCCCB7TQCtIg== Accept-Language: fr-FR, en-US Content-Language: fr-FR X-Originating-IP: [195.221.0.171] Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailing-List: archive/latest/16675 List-ID: List-URL: List-Archive: https://lists.debian.org/msgid-search/A2A20EC3B8560D408356CAC2FC148E53015B379E5C@SUN-DAG3.synchrotron-soleil.fr Approved: robomod@news.nic.it Lines: 101 Organization: linux.* mail to news gateway Sender: robomod@news.nic.it X-Original-Cc: MARIE Alexandre X-Original-Date: Wed, 9 Jan 2019 10:27:41 +0000 X-Original-Message-ID: Xref: csiph.com linux.debian.maint.python:11224 Hello, while preparing one of our package (pyfai), we endup with an FTBFS due to=20 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 loadTestsFromN= ames suites =3D [self.loadTestsFromName(name, module) for name in names] File "/usr/lib/python2.7/unittest/loader.py", line 115, in loadTestsFromN= ame test =3D 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, i= n 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.functoo= ls_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/backp= orts# touch __init__.py then it works # python -c "import backports.functools_lru_cache; print backports.functool= s_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 n= ow 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=E9d=E9ric [1] https://tracker.debian.org/pkg/backports.functools-lru-cache [2] https://tracker.debian.org/media/packages/b/backports.functools-lru-cac= he/rules-1.5-1 [3] https://tracker.debian.org/media/packages/b/backports.functools-lru-cac= he/changelog-1.5-1 [4] https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=3D884690=