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.