Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.debian.maint.python > #11224

dh_python2 namespace issue ?

Path csiph.com!aioe.org!bofh.it!news.nic.it!robomod
From PICCA Frederic-Emmanuel <frederic-emmanuel.picca@synchrotron-soleil.fr>
Newsgroups linux.debian.maint.python
Subject dh_python2 namespace issue ?
Date Wed, 09 Jan 2019 12:00:01 +0100
Message-ID <xejKx-19v-1@gated-at.bofh.it> (permalink)
X-Mailbox-Line From debian-python-request@lists.debian.org Wed Jan 9 10:51:08 2019
Old-Return-Path <frederic-emmanuel.picca@synchrotron-soleil.fr>
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 <debian-python@lists.debian.org> archive/latest/16675
List-ID <debian-python.lists.debian.org>
List-URL <https://lists.debian.org/debian-python/>
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 <alexandre.marie@synchrotron-soleil.fr>
X-Original-Date Wed, 9 Jan 2019 10:27:41 +0000
X-Original-Message-ID <A2A20EC3B8560D408356CAC2FC148E53015B379E5C@SUN-DAG3.synchrotron-soleil.fr>
Xref csiph.com linux.debian.maint.python:11224

Show key headers only | View raw


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 <module>
    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 "/<<BUILDDIR>>/pyfai-0.17.0+dfsg1/.pybuild/cpython2_2.7_pyfai/build/pyFAI/test/__init__.py", line 50, in suite
    from . import test_all
  File "/<<BUILDDIR>>/pyfai-0.17.0+dfsg1/.pybuild/cpython2_2.7_pyfai/build/pyFAI/test/test_all.py", line 50, in <module>
    from . import test_peak_picking
  File "/<<BUILDDIR>>/pyfai-0.17.0+dfsg1/.pybuild/cpython2_2.7_pyfai/build/pyFAI/test/test_peak_picking.py", line 48, in <module>
    from ..gui.peak_picker import PeakPicker
  File "/<<BUILDDIR>>/pyfai-0.17.0+dfsg1/.pybuild/cpython2_2.7_pyfai/build/pyFAI/gui/peak_picker.py", line 59, in <module>
    from .utils import update_fig, maximize_fig
  File "/<<BUILDDIR>>/pyfai-0.17.0+dfsg1/.pybuild/cpython2_2.7_pyfai/build/pyFAI/gui/utils/__init__.py", line 41, in <module>
    from .. import matplotlib
  File "/<<BUILDDIR>>/pyfai-0.17.0+dfsg1/.pybuild/cpython2_2.7_pyfai/build/pyFAI/gui/matplotlib.py", line 48, in <module>
    import matplotlib
  File "/usr/lib/python2.7/dist-packages/matplotlib/__init__.py", line 130, in <module>
    from matplotlib.rcsetup import defaultParams, validate_backend, cycler
  File "/usr/lib/python2.7/dist-packages/matplotlib/rcsetup.py", line 29, in <module>
    from matplotlib.fontconfig_pattern import parse_fontconfig_pattern
  File "/usr/lib/python2.7/dist-packages/matplotlib/fontconfig_pattern.py", line 28, in <module>
    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 "<string>", line 1, in <module>
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"
<module 'backports.functools_lru_cache' from '/usr/lib/python2.7/dist-packages/backports/functools_lru_cache.pyc'>


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

Back to linux.debian.maint.python | Previous | Next — Next in thread | Find similar | Unroll thread


Thread

dh_python2 namespace issue ? PICCA Frederic-Emmanuel <frederic-emmanuel.picca@synchrotron-soleil.fr> - 2019-01-09 12:00 +0100
  Re: dh_python2 namespace issue? Piotr Ożarowski <piotr@debian.org> - 2019-01-09 14:50 +0100

csiph-web