On 25 Apr, 2010, at 16:43, Michael Foord wrote:

> On 25/04/2010 15:31, Ronald Oussoren wrote:
>> On 24 Apr, 2010, at 18:19, Michael Foord wrote:
>> 
>>   
>>> On 18/04/2010 16:48, Ronald Oussoren wrote:
>>>     
>>>> [snip...]
>>>>       
>>>>>    Michael>  A build on my machine produces output similar to:
>>>>> 
>>>>>    Michael>  Python build finished, but the necessary bits to build these 
>>>>> modules
>>>>>    Michael>  were not found:
>>>>>    Michael>  _bsddb             dl                 gdbm
>>>>> 
>>>>>         
>>>> * _bsddb and gdbm require external libraries that aren't provided in the 
>>>> system install
>>>> 
>>>>       
>>> Sorry for duplicating this conversation - just going through my outstanding 
>>> emails. Feel free to ignore the one on python-dev.
>>> 
>>> What are the external libraries? This is probably documented somewhere, so 
>>> could you point me to it? (Sorry - my ignorance I know.)
>>>     
>> gdbm and bsddb are python wrappers for C libraries that aren't part of OSX, 
>> if you want to use them you have to install those C libraries manually (GNU 
>> DBM and Sleepycat DB).
>> 
>>   
> 
> Is all this documented anywhere? (A description of how to do a "full" build - 
> all supported modules - on Mac OS X.)

Not that I know.  The OSX installers on python.org include more C libraries, 
but not everything. The script that creates those installers is in the 
repository and it should be easy enough to enhance that to include more 
libraries.
>>>>>         
>>>> readline requires an external library or python 2.6.5, 2.7 or 3.2.
>>>>       
>>> Hmm... I have readline installed (via homebrew). Is that not sufficient?
>>>     
>> That should work, but only when setup.py finds that readline install.
>> 
>>   
> 
> How do I configure that? It looks like the location needs to be in 
> PyBuildExt.compiler.lib_dirs - inherited from 
> distutils.command.build_ext.build_ext. It doesn't look very easily 
> configurable.
> 
> The documentation is a little "terse" (i.e. non-existent): 
> http://docs.python.org/distutils/apiref.html#module-distutils.command.build_ext

One trick it so add   OPT="/my/build/root/include" 
LDFLAGS="-L/my/build/root/lib" to the configure line, that way setup.py will 
look into /my/build/root/include for headers (and .../lib for library files).

One other thing: the OSX linker looks for dynamic libraries all along its 
search path before looking for static libraries, you have to add " 
-search_paths_first" to LDFLAGS if you have static libraries that you want to 
link to which may also be on the system.

BTW. If you don't mind getting libedit instead of GNU readline run configure 
with 'MACOSX_DEPLOYMENT_TARGET=10.5' (or 10.6) in the shell environment.  The 
resulting binary will require OSX 10.5 and setup.py will then use the readline 
emulation in the system  library 'libedit' (it won't do so with the default 
options because that generates a binary that runs on 10.3.9 or 10.4 and those 
don't have a good enough libedit library).   Libedit is a BSD library that 
offers simular functionality to GNU readline, but using a different C API and a 
different configuration. 

Ronald

> 
> All the best,
> 
> Michael Foord
> 
>>>> This one should work. Do you have a /Library/Framework/Tcl.framework? If 
>>>> so, what is the output of "file /Library/Frameworks/Tcl.framework/Tcl", 
>>>> what OSX release are you building on and what are the configure flags.
>>>> 
>>>> 
>>>>       
>>> OS X 10.6.3.
>>> 
>>> $ file /Library/Frameworks/Tcl.framework/Tcl
>>> /Library/Frameworks/Tcl.framework/Tcl: Mach-O universal binary with 2 
>>> architectures
>>> /Library/Frameworks/Tcl.framework/Tcl (for architecture ppc):   Mach-O 
>>> dynamically linked shared library ppc
>>> /Library/Frameworks/Tcl.framework/Tcl (for architecture i386):  Mach-O 
>>> dynamically linked shared library i386
>>> 
>>> My configure command is: ./configure --prefix=/dev/null --with-pydebug
>>>     
>> On 10.6 the compiler generates 64-bit code by default, use:
>> 
>> configure --enable-universalsdk=/ ...
>> 
>> Ronald
>> 
>>   
> 
> 
> -- 
> http://www.ironpythoninaction.com/
> http://www.voidspace.org.uk/blog
> 
> READ CAREFULLY. By accepting and reading this email you agree, on behalf of 
> your employer, to release me from all obligations and waivers arising from 
> any and all NON-NEGOTIATED agreements, licenses, terms-of-service, 
> shrinkwrap, clickwrap, browsewrap, confidentiality, non-disclosure, 
> non-compete and acceptable use policies (”BOGUS AGREEMENTS”) that I have 
> entered into with your employer, its partners, licensors, agents and assigns, 
> in perpetuity, without prejudice to my ongoing rights and privileges. You 
> further represent that you have the authority to release me from any BOGUS 
> AGREEMENTS on behalf of your employer.
> 
> 

Attachment: smime.p7s
Description: S/MIME cryptographic signature

_______________________________________________
Pythonmac-SIG maillist  -  Pythonmac-SIG@python.org
http://mail.python.org/mailman/listinfo/pythonmac-sig
unsubscribe: http://mail.python.org/mailman/options/Pythonmac-SIG

Reply via email to