comp.lang.ada
 help / color / mirror / Atom feed
From: "Dmitry A. Kazakov" <mailbox@dmitry-kazakov.de>
Subject: Re: components_4_64 Test_Python fails on Mac Monterey
Date: Fri, 21 Oct 2022 22:00:16 +0200	[thread overview]
Message-ID: <tiutoe$q1q$1@gioia.aioe.org> (raw)
In-Reply-To: lyy1t9nevu.fsf@pushface.org

On 2022-10-21 21:41, Simon Wright wrote:
> "Dmitry A. Kazakov" <mailbox@dmitry-kazakov.de> writes:
> 
>> On 2022-10-21 19:04, Simon Wright wrote:
>>> "Dmitry A. Kazakov" <mailbox@dmitry-kazakov.de> writes:
>>>
>>>> This selects py-load_python_library.adb from os/pthread which is just
>>>> a copy of os/linux. Likely there are differences between Linux and
>>>> OSX.
>>> dlopen() would need to see e.g.
>>>     $FRAMEWORKS/Python.framework/Python/Versions/3.8/lib/libpython3.8.dylib
>>> where $FRAMEWORKS would normally be /Library/Frameworks but, in
>>> Roger's
>>> case (running Homebrew), would be $HOMEBREW_PREFIX/Frameworks (Roger
>>> might have frameworks scattered bewtween the two places, for added fun).
>>
>> Thanks Simon.
>>
>> Is the variable $FRAMEWORKS set or I have to search a whole set of
>> subdirectories?
> 
> It's not set; I'm not sure what the Homebrew version would look like,
> but it's probably like /Library/Frameworks. And I left out Current,
> which chooses between e.g. 3.8, 3.9.
> 
> libpython := '';
> find_libpython:
> for top in $HOMEBREW_PREFIX/Frameworks, /Library/Frameworks loop
>     if exists $top/Python then
>        libpython := $top/Python/Versions/Current/lib/libpython*.dylib;
>        exit find_libpython;
>     end if;
> end loop find_libpython;
> fail if libpython is still ''
> 
> ==========
> 
> There is another macOS package manager, MacPorts, but I've settled on
> Homebrew.

I researched a little bit. Mac's Python is even more messy than Windows' 
one. That is an achievement of its own! (:-))

So far I come to the list

    /usr/lib
    /Library/Frameworks/Python.framework/Versions
    /sw/lib
    /opt/lib
    /opt/homebrew/lib

each to be searched recursively for the name:

    libpython3.*.dylib

P.S. It seems that I must check Julia bindings as well. So far it looks 
so that nobody ever used them on Mac.

-- 
Regards,
Dmitry A. Kazakov
http://www.dmitry-kazakov.de

      reply	other threads:[~2022-10-21 20:00 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-10-21  1:58 components_4_64 Test_Python fails on Mac Monterey Roger Mc
2022-10-21  7:05 ` Dmitry A. Kazakov
2022-10-21 11:12   ` Roger Mc
2022-10-21 12:46     ` Dmitry A. Kazakov
2022-10-21 17:04       ` Simon Wright
2022-10-21 18:30         ` Dmitry A. Kazakov
2022-10-21 19:41           ` Simon Wright
2022-10-21 20:00             ` Dmitry A. Kazakov [this message]
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox