What breaks if I remove lib/python2.7/test/* ?
What breaks if I remove lib/python2.7/test/* ? What purpose does it serve? It is 26MB for me. I am trying to trim my Python install for good reason. Thanks for any info! -- http://mail.python.org/mailman/listinfo/python-list
socket.gethostbyaddr() wrongly returning a DNS CNAME as the 'primary' hostname
Python 2.7.1 (perhaps others) I believe this is a bug. Comments? Docs state: Return a triple (hostname, aliaslist, ipaddrlist) where hostname is the primary host name responding to the given ip_address, aliaslist is a (possibly empty) list of alternative host names for the same address, and ipaddrlist is a list of IPv4/v6 addresses for the same interface on the same host (most likely containing only a single address). my-dns-cname.our.org is a CNAME record for primary.our.org primary.our.org has IP address xx.xx.xx.xx import socket socket.gethostbyaddr('xx.xx.xx.xx') returns: ('my-dns-cname.our.org', ['primary.our.org'], ['xx.xx.xx.xx']) -- http://mail.python.org/mailman/listinfo/python-list
Re: socket.gethostbyaddr() wrongly returning a DNS CNAME as the 'primary' hostname
Thanks for the reply, Ned. Bummer for me. Check this out: C code on Solaris 10 SPARC returns the following with nscd running (the Solaris Naming Services Caching Daemon, on by default): PRIMARY according to gethostbyaddr(): my-dns-cname.our.org ALIAS according to gethostbyaddr(): primary.our.org However, I can stop/start nscd and get the complete opposite (correct) result. C code on Solaris 10 SPARC returns the following with nscd OFF: PRIMARY according to gethostbyaddr(): my-dns-cname.our.org ALIAS according to gethostbyaddr(): primary.our.org These then ALTERNATE consistently with every successive invocation of my code. C code on Linux 2.6 with glibc 2.5 returns: PRIMARY according to gethostbyaddr(): primary.our.org [ no aliases get listed ] Time to query the corporate DNS folks. -- http://mail.python.org/mailman/listinfo/python-list
Modules failing to add runtime library path info at link time
Hey everyone, this has been driving me crazy for long enough now that I'm motivated to post and find an answer. Before I pose my question, let me state that using LD_LIBRARY_PATH is not the answer :) We have things installed in odd places, such as very specific versions of libraries to link against, etc. When I build a module (let's say PyGreSQL for instance) via python setup.py build, the link part is including a proper -L argument (-L/ some/weird/lib because /some/weird/bin was in PATH), but is omitting the additional needed runtime linker arguments. For Solaris that's -R/some/weird/lib For Linux that's -Xlinker -rpath -Xlinker /some/weird/lib Where/how can I configure the appropriate portion of our Python install to do 100% the right thing instead of just 50% (-L)? A specific example -- note the -L and lack of -R (Solaris build): % python setup.py build ... gcc -shared build/temp.solaris-2.10-sun4u-2.6/pgmodule.o -L/afs/rcf/ apps/catchall/lib -lpq -o build/lib.solaris-2.10-sun4u-2.6/_pg.so % -- http://mail.python.org/mailman/listinfo/python-list
Re: Modules failing to add runtime library path info at link time
On Feb 1, 8:00 pm, Christian Heimes wrote: > cjblaine wrote: > > Where/how can I configure the appropriate portion of our Python > > install to do 100% the right thing instead of just 50% (-L)? > > Python's distutils doesn't alter the library search path unless you tell > it explicitly. > > > A specific example -- note the -L and lack of -R (Solaris build): > > > % python setup.py build > > > > gcc -shared build/temp.solaris-2.10-sun4u-2.6/pgmodule.o -L/afs/rcf/ > > apps/catchall/lib -lpq -o build/lib.solaris-2.10-sun4u-2.6/_pg.so > > % > > The Extension() class supports the rpath argument. Simply add > rpath="/path/to/library/dir" and you are good. > > Christian Thanks for the reply. So, python setup.py build rpath="/whatever/lib" ? -- http://mail.python.org/mailman/listinfo/python-list
Re: Modules failing to add runtime library path info at link time
On Feb 1, 11:04 pm, cjblaine wrote: > On Feb 1, 8:00 pm, Christian Heimes wrote: > > > > > cjblaine wrote: > > > Where/how can I configure the appropriate portion of our Python > > > install to do 100% the right thing instead of just 50% (-L)? > > > Python's distutils doesn't alter the library search path unless you tell > > it explicitly. > > > > A specific example -- note the -L and lack of -R (Solaris build): > > > > % python setup.py build > > > > > > gcc -shared build/temp.solaris-2.10-sun4u-2.6/pgmodule.o -L/afs/rcf/ > > > apps/catchall/lib -lpq -o build/lib.solaris-2.10-sun4u-2.6/_pg.so > > > % > > > The Extension() class supports the rpath argument. Simply add > > rpath="/path/to/library/dir" and you are good. > > > Christian > > Thanks for the reply. > > So, python setup.py build rpath="/whatever/lib" ? Replying to myself: No. Actually, Christian, it looks like it's runtime_library_dirs? class Extension: ... runtime_library_dirs : [string] list of directories to search for C/C++ libraries at run time (for shared extensions, this is when the extension is loaded) So, how does one inject that into, I assume, setup.cfg ? Ideally it could be done via the build command-line, but I don't see a way to do that when browsing python setup.py build --help ( there is no setup.cfg provided in the PyGreSQL source tree, to ) ( continue that example case ) -- http://mail.python.org/mailman/listinfo/python-list
Re: Modules failing to add runtime library path info at link time
On Feb 1, 11:35 pm, cjblaine wrote: > On Feb 1, 11:04 pm, cjblaine wrote: > > > > > On Feb 1, 8:00 pm, Christian Heimes wrote: > > > > cjblaine wrote: > > > > Where/how can I configure the appropriate portion of our Python > > > > install to do 100% the right thing instead of just 50% (-L)? > > > > Python's distutils doesn't alter the library search path unless you tell > > > it explicitly. > > > > > A specific example -- note the -L and lack of -R (Solaris build): > > > > > % python setup.py build > > > > > > > > gcc -shared build/temp.solaris-2.10-sun4u-2.6/pgmodule.o -L/afs/rcf/ > > > > apps/catchall/lib -lpq -o build/lib.solaris-2.10-sun4u-2.6/_pg.so > > > > % > > > > The Extension() class supports the rpath argument. Simply add > > > rpath="/path/to/library/dir" and you are good. > > > > Christian > > > Thanks for the reply. > > > So, python setup.py build rpath="/whatever/lib" ? > > Replying to myself: > > No. Actually, Christian, it looks like it's runtime_library_dirs? > > class Extension: > ... > runtime_library_dirs : [string] > list of directories to search for C/C++ libraries at run time > (for shared extensions, this is when the extension is loaded) > > So, how does one inject that into, I assume, setup.cfg ? Ideally it > could be done via the build command-line, but I don't see a way to do > that when browsing python setup.py build --help > > ( there is no setup.cfg provided in the PyGreSQL source tree, to ) > ( continue that example case ) Anyone? -- http://mail.python.org/mailman/listinfo/python-list