[Python-Dev] Finding the python library binaries (and docs)

David Abrahams dave at boost-consulting.com
Wed Mar 7 01:13:28 CET 2007


on Tue Mar 06 2007, "Martin v. Löwis" <martin-AT-v.loewis.de> wrote:
> David Abrahams schrieb:
>> on Tue Mar 06 2007, "Martin v. Löwis" <martin-AT-v.loewis.de> wrote:
>>> David Abrahams schrieb:
>>>> I'm trying to find the Python library binaries associated with a given
>>>> python executable. 
>>> This really isn't a python-dev question; please use python-list
>>> (news:comp.lang.python) instead. 
>>
>> I wrestled with the right list for this one and determined that only
>> the python devs would know the answers. 
>
> That absolutely cannot be the case. Python is open source, you have
> *everything* you need to answer this question.

That assumes this is one of those questions to which "use the source"
is applicable. I think answering it requires some understanding of
intention that's not explicit in the source.  'Course, it may be that
the answer is "nobody knows."

>>>>   2. I'd like to know if there's an officially correct procedure for
>>>>      finding the library binaries associated with a Python executable.
>>> Yes (although I'm not sure what a "library binary" is).
>>
>> I gave one example in my post: libpython25.a
>
> Ah, ok. If you want to know where that is installed (officially),
> check out what "make install" does. Also, ask yourself whether you know
> a Python module that should know how to find it. distutils 

No help there.  It has at best a haphazard method of looking for
libraries, and never looks in a /config subdirectory on linux AFAICT.
Also AFAICT the results are not tied to a particular Python
executable.

Looking at some code that works most of the time because the authors
tried to deduce intention by looking at the Python source and existing
installations isn't much better than trying to deduce intention by
looking at the Python source and existing installations myself.

> and freeze

Not part of Python?  


-- 
Dave Abrahams
Boost Consulting
www.boost-consulting.com


More information about the Python-Dev mailing list