[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: pybuild renaming extensions breaks upstream code



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

Attachment: signature.asc
Description: PGP signature


Reply to: