On 14 Feb, 2007, at 1:15, Phillip J. Eby wrote:
At 02:35 PM 2/13/2007 -0800, Ronald Oussoren wrote:
Philip,
The attached patched replaces pkg_resources._macosx_vers by a function that directly parses the relevant XML file instead of using sw_vers. The patch is an svn diff relative to the trunk.
The main reason I prefer this version is that I'm debugging some C code in a project using setuptools using command-line gdb (who needs IDE's?) and I often (but not always) get I/O errors when reading from a pipe to a forked-off process when running python from gdb. With this patch pkg_resources no longer forks of processes and gdb is happy.
When you're not using gdb there's little reason to prefer this version over the original one.
Your patch uses plistlib, which doesn't appear to be part of the Python standard library.
It is on osx, the only platform where _macosx_vers is used. Ronald