Path: csiph.com!eternal-september.org!feeder.eternal-september.org!aioe.org!bofh.it!news.nic.it!robomod From: Dmitry Shachnev Newsgroups: linux.debian.maint.python Subject: Re: pybuild renaming extensions breaks upstream code Date: Mon, 04 Jul 2016 17:30:01 +0200 Message-ID: References: X-Original-To: debian-python@lists.debian.org X-Mailbox-Line: From debian-python-request@lists.debian.org Mon Jul 4 15:24:20 2016 Old-Return-Path: X-Amavis-Spam-Status: No, score=-12.467 tagged_above=-10000 required=5.3 tests=[BAYES_00=-2, FREEMAIL_ENVFROM_END_DIGIT=0.25, FREEMAIL_FORGED_FROMDOMAIN=0.001, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.001, LDO_WHITELIST=-5, PGPSIGNATURE=-5, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01] autolearn=ham autolearn_force=no X-Policyd-Weight: NOT_IN_SBL_XBL_SPAMHAUS=-1.5 NOT_IN_BL_NJABL=-1.5 CL_IP_EQ_HELO_IP=-2 (check from: .gmail. - helo: .mail-lf0-f50.google. - helo-domain: .google.) FROM/MX_MATCHES_HELO(DOMAIN)=-2; rate: -7 X-Google-Dkim-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:date:from:to:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=/5S6qnOXtjjsJF66YoIADp9FkQWr7BwjjuRO8bKBVdA=; b=FUnJ9DkNuiYJH+sE+2KmKeVcybBu9NtGjiqgWBp+YQMkq/iFuG1vbZRAu+YQ7FFaQ1 ua96K5gBI9mj13c62i+6NYCYwNsyoqYMEztoM+22iT7iMUZawyBJXwFi6wg1q5v1jRCv AvQPUM5iH0eDVKT4QfJrfuDMkUxDTqv6rh4HzGNuwtfQX+4d7H7UwFBOiNF20EsMFOrb RXfyG1hm9J5xds3I2SFhiZMGZHSUpmlfBsTr3seNtNiG+VixyJSeoDNrrigMMpSMXSic uCsE5i2lPrmnXdlEk7MeK5aV2SBXUZgG6wRAEUKKtvQGV6Kt8kUf3UORoZNkxcnvlolf cqag== X-Gm-Message-State: ALyK8tJGDQruJ/wCg4W2C4Ldz2YweXOt6KDfx3i0gxiIFKHFszt9GUSb/orcprb11A/dnA== X-Received: by 10.46.1.228 with SMTP id f97mr3074874lji.26.1467644842726; Mon, 04 Jul 2016 08:07:22 -0700 (PDT) MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="FL5UXtIhxfXey3p5" Content-Disposition: inline User-Agent: Mutt/1.6.0 (2016-04-01) X-Mailing-List: archive/latest/13971 List-ID: List-URL: List-Archive: https://lists.debian.org/msgid-search/20160704150718.GB3649@mitya57.me Approved: robomod@news.nic.it Lines: 46 Organization: linux.* mail to news gateway Sender: robomod@news.nic.it X-Original-Date: Mon, 4 Jul 2016 18:07:18 +0300 X-Original-Message-ID: <20160704150718.GB3649@mitya57.me> X-Original-References: <20160703060306.GB6128@mitya57.me> <89a6acfa-3afd-d8b9-0e59-dea94551b804@ghraoui.name> Xref: csiph.com linux.debian.maint.python:8636 --FL5UXtIhxfXey3p5 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Hi Afif, On Sun, Jul 03, 2016 at 02:37:41AM -0700, Afif Elghraoui wrote: > It's a Python extension as far as I know. After investigating this a bit > more, it seems that numpy's ctypeslib.load_library function can guess > the library's extension. So for the unit test (before dh-python has > renamed anything and the library is still librarybasename.so), it can > guess properly if it's called as > > numpy.ctypeslib.load_library("librarybasename","/path/to/library/") > > but this won't work afterwards. If it *is* a Python extension, you can simply import it and get the path using the __path__ attribute. -- Dmitry Shachnev --FL5UXtIhxfXey3p5 Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQIcBAEBCAAGBQJXenuiAAoJENb+cQNj+F3TSbAP/2gry0IYj7P2lZnjIn7Y+GyH mcJGlPTxz6nDKt3YUSpW4asAHiQYSr5ucB6ZcjWjhXl+aDeuqbigBB1Asoa6n+L1 +Ui/mAZAdrwGplvtVrrVmS5cTNGGiKapnsGAdIlQpWWVVofDVPNGvijJhlJV534q nb2MJz5N7esaXgcDJ8LmRs8O4w5vnESLRCsXCvsbcM+ZmInvYRr+m44zpXJgj6mG SWiKAfYB2gqY/Hpo78wL8Bytto1b+YQKQJ8HNMm+Hp7HGYnk+qCern2WbEsNEuRv jgdIOYITvmSdZL7T4EUETltfM9GGuVO7UweNBadyrACuqiYY7QzqXcG62FL+FPih dX6tA7ZgHOLC+/FqZV9ihh+QmM0qmp1KKv/eERWr8ugc3cwIFAsbOQYWpuUiyAs4 bBAZ6f1UZIhYa/oJjwQcFNtDReQSOuIJXhm3yqH9JGeFStpgqXM5ghFlk+5yepq8 elL7+J3B82hGkJIUa8XjNj91V48D0LmXDQj7oWFNiOGNr9OnnLpdJVKGvjfD19fH fVaAZgQonFYqf5u/QA+IicbnUDSYwBD9WgfItJZgHKeZ0M6AATAlIik9S0zYXLst 3AvOlgSNEQuLkUMZ032iBDU4hYANYFtgHwq0vQ50Dxxv9ETsuwtYIBS0ANvAIBKa n+iFh9wz4NOUJ13WV+FP =tYsz -----END PGP SIGNATURE----- --FL5UXtIhxfXey3p5--