[Distutils] pkg_resources._macosx_vers without using os.popen
Ronald Oussoren
ronaldoussoren at mac.com
Tue Feb 13 23:35:51 CET 2007
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.
Ronald
-------------- next part --------------
A non-text attachment was scrubbed...
Name: pkg_resources-macosx-vers.diff
Type: application/octet-stream
Size: 804 bytes
Desc: not available
Url : http://mail.python.org/pipermail/distutils-sig/attachments/20070213/5774824a/attachment.obj
More information about the Distutils-SIG
mailing list