Zooko O'Whielacronx <[EMAIL PROTECTED]> added the comment: Please see also #3937 for a patch which first tries to parse "/etc/lsb-release", then tries to execute "lsb_release", then falls back to the old behavior of platform.dist(). (Note that parsing the file named /etc/lsb-release is not guaranteed to work by the Linux Standard Base spec, but that executing "lsb_release" is. On the other hand, the former currently seems to work on more Debian/Ubuntu installations than the latter does, and invoking lsb_release in a subprocess takes significantly more time.)
Please see the links to the Linux Standard Base specifications which I posted in #3937. (The specification was originally published in 2001, so most of the Linux systems that future versions of Python will be deployed on were developed long after that specification was written.) My patch, in #3937, is against the python-release25-maint branch. I tested the patch locally and it worked, and then I wrote a patch for my project -- allmydata.org "Tahoe" -- which does something similar: http://allmydata.org/trac/tahoe/browser/src/allmydata/__init__.py?rev=2976 I committed that change to Tahoe, and it was automatically tested on eleven different systems by our buildbot: http://allmydata.org/buildbot/waterfall The resulting distribution-identification can be seen in the logs of those tests. For any machine on the waterfall, click on the "test.log" hyperlink and search in text for "tahoe versions:". For example, here is the one for our Debian etch machine -- "debian", "4.0": http://allmydata.org/buildbot/builders/etch/builds/1205/steps/test/logs/test.log here is the one for the Ubuntu dapper machine -- "Ubuntu", "6.06": http://allmydata.org/buildbot/builders/dapper/builds/1773/steps/test/logs/test.log and here is the result for my Ubuntu hardy workstation -- "Ubuntu", "8.04": http://allmydata.org/buildbot/builders/zooko%20yukyuk%20hardy/builds/216/steps/test/logs/test.log ---------- nosy: +zooko _______________________________________ Python tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue1322> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com