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


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

Bug#980005: lumpy-sv: lumpyexpress fails with no args

Path csiph.com!news.mixmin.net!aioe.org!bofh.it!news.nic.it!robomod
From Ken Yamaguchi <debian@knowledgesynthesis.com>
Newsgroups linux.debian.bugs.dist, linux.debian.maint.python
Subject Bug#980005: lumpy-sv: lumpyexpress fails with no args
Date Wed, 13 Jan 2021 00:10:01 +0100
Message-ID <BwAXv-4HF-1@gated-at.bofh.it> (permalink)
References <Bwy9k-30B-5@gated-at.bofh.it> <Bwz5o-3yG-15@gated-at.bofh.it> <BwA1r-49m-3@gated-at.bofh.it> <Bwy9k-30B-5@gated-at.bofh.it> <BwA1r-49m-3@gated-at.bofh.it>
X-Mailbox-Line From debian-bugs-dist-request@lists.debian.org Tue Jan 12 23:09:08 2021
Old-Return-Path <debbugs@buxtehude.debian.org>
X-Spam-Flag NO
X-Spam-Score -2.028
Reply-To Ken Yamaguchi <debian@knowledgesynthesis.com>, 980005@bugs.debian.org
Resent-To debian-bugs-dist@lists.debian.org
Resent-Cc Debian Med Packaging Team <debian-med-packaging@lists.alioth.debian.org>
X-Debian-Pr-Message followup 980005
X-Debian-Pr-Package lumpy-sv
X-Debian-Pr-Keywords help confirmed
X-Debian-Pr-Source lumpy-sv
X-Spam-Bayes score:0.0000 Tokens: new, 35; hammy, 149; neutral, 39; spammy, 1. spammytokens:0.987-1--H*r:sk:ip-10-0 hammytokens:0.000-+--H*UA:1.10.1, 0.000-+--H*u:1.10.1, 0.000-+--H*UA:2018-07-13, 0.000-+--H*u:2018-07-13, 0.000-+--UD:patch
Dkim-Signature v=1; a=rsa-sha256; c=simple/simple; d=knowledgesynthesis.com; s=201812; t=1610492201; bh=egOA6qNHHYYmrt2r4phNfU/HFC6Qh4NRBlvcVBA+VvI=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=QiVSBMR3JGp3sNBS164H1kUaFpy38fTlb0FSzt5o7RfGOKRDLenofBo6mMrt5u1iA V8iNPIqLupdHN6md16mkNzDJsM61evnD6up/YXpB7CT1lLcmBhQChnPAx5XYjhbo8Y CSpIGwriTA2di1AcjmMp6k01Jh8vh5MdiZUl0qP4mf75sm0ycYeyHtgX96JCF91Nff hYOksvh3b5mL1xru9Haz4xYRB78SqqaKkrQp9xqjPndpkToPkDwS1/JomdhdR8AEBH IkaEj4X3xKNKBaszhe44/X4992yzYycAhgCic8+MEdep4fxDHqoTBxsnf9GOufyqLw CzSceD7lXSH7Q==
MIME-Version 1.0
Content-Type text/plain; charset=us-ascii
Content-Disposition inline
User-Agent Mutt/1.10.1 (2018-07-13)
X-Greylist delayed 528 seconds by postgrey-1.36 at buxtehude; Tue, 12 Jan 2021 23:05:33 UTC
X-Debian-Message from BTS
X-Mailing-List <debian-bugs-dist@lists.debian.org> archive/latest/1644355
List-ID <debian-bugs-dist.lists.debian.org>
List-URL <https://lists.debian.org/debian-bugs-dist/>
Approved robomod@news.nic.it
Lines 39
Organization linux.* mail to news gateway
Sender robomod@news.nic.it
X-Original-Cc Andreas Tille <andreas@an3as.eu>, 980005@bugs.debian.org, Debian Python <debian-python@lists.debian.org>
X-Original-Date Tue, 12 Jan 2021 22:56:41 +0000
X-Original-Message-ID <20210112225641.GA10978@knowledgesynthesis.com>
X-Original-References <161048192648.3215.17832019956441998304.reportbug@2fa8301b1b93> <20210112210821.GE5326@an3as.eu> <ff1e7e80-56af-2b34-0a6c-53fdb612c8b5@gmail.com> <161048192648.3215.17832019956441998304.reportbug@2fa8301b1b93> <ff1e7e80-56af-2b34-0a6c-53fdb612c8b5@gmail.com>
Xref csiph.com linux.debian.bugs.dist:1042274 linux.debian.maint.python:13106

Cross-posted to 2 groups.

Show key headers only | View raw


On Wed, Jan 13, 2021 at 12:04:08AM +0200, Juhani Numminen wrote:
> It's a change made in debian/patches/lumpyexpress.config.patch.
> https://salsa.debian.org/med-team/lumpy-sv/-/commit/e64a65545fbf60c5c98965bc1d00d416b2f9582c#6864ced7557ec33a7ee70c7b0c75b076f84f4fac_24_30
> 
> -    $PYTHON_TEST -c "import imp; imp.find_module('pysam')"
> -    $PYTHON_TEST -c "import imp; imp.find_module('numpy')"
> +    $PYTHON_TEST -c "import importlib; importlib.util.find_spec('pysam')"
> +    $PYTHON_TEST -c "import importlib; importlib.util.find_spec('numpy')"
> 
> It's not entirely correct even if it worked: the original causes
> a visible error message to alert if one of the required modules does
> not exist. The current patch will not cause error messages or the
> python check to exit non-zero.
> 
> Because it's a Debian context we could rely on dpkg dependencies i.e.
> just don't perform this check and comment out the two lines.
> 
> --
> Juhani

There's a discussion of the issue at

    https://stackoverflow.com/questions/39660934/error-when-using-importlib-util-to-check-for-library/39661116

To remove the error,

-    $PYTHON_TEST -c "import imp; imp.find_module('pysam')"
-    $PYTHON_TEST -c "import imp; imp.find_module('numpy')"
+    $PYTHON_TEST -c "from importlib import util; util.find_spec('pysam')"
+    $PYTHON_TEST -c "from importlib import util; util.find_spec('numpy')"

To print an error message, perhaps the awkward-looking

-    $PYTHON_TEST -c "import imp; imp.find_module('pysam')"
-    $PYTHON_TEST -c "import imp; imp.find_module('numpy')"
+    $PYTHON_TEST -c "from importlib import util; print('pysam not found') if util.find_spec('pysam') is None else None"
+    $PYTHON_TEST -c "from importlib import util; print('numpy not found') if util.find_spec('numpy') is None else None"

Ken

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


Thread

Bug#980005: lumpy-sv: lumpyexpress fails with no args Andreas Tille <andreas@an3as.eu> - 2021-01-12 22:10 +0100
  Bug#980005: lumpy-sv: lumpyexpress fails with no args Juhani Numminen <juhaninumminen0@gmail.com> - 2021-01-12 23:10 +0100
    Bug#980005: lumpy-sv: lumpyexpress fails with no args Ken Yamaguchi <debian@knowledgesynthesis.com> - 2021-01-13 00:10 +0100

csiph-web