Load dynamic library for python library

Joshua Root jmr at macports.org
Fri Feb 8 03:05:54 UTC 2019


On 2019-2-8 13:59 , Casey Deccio wrote:
> 
> 
>> On Feb 7, 2019, at 7:03 PM, Joshua Root <jmr at macports.org> wrote:
>>
>> BTW Gmail decided my reply was spam; sending only to the list this time
>> so Casey might actually see it...
> 
> Much appreciated :)
> 
>> On 2019-2-8 13:00 , Joshua Root wrote:
>>>
>>> Ctypes uses dlopen behind the scenes, and if you look at dlopen's man
>>> page, it only searches a small set of fallback paths when the full path
>>> to the library is not supplied, most of which are controlled by
>>> environment variables. So I would say that py-libnacl should be passing
>>> the full path to libnacl to ctypes.cdll.LoadLibrary.
> 
> Thanks for the feedback!  I figured it should have that path provided somehow.  So, should an issue/pull request be filed with the py-libnacl port then?  Where is the right place for the path to be provided?

The call is in libnacl/__init__.py. I'd patch in a placeholder and use
reinplace to insert the value of $prefix.

- Josh


More information about the macports-dev mailing list