This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author zooko
Recipients benjamin.peterson, bgomes, christian.heimes, draghuram, georg.brandl, lemburg, pavel.vinogradov, sapetnioc, zooko
Date 2008-09-23.17:39:44
SpamBayes Score 2.1404e-12
Marked as misclassified No
Message-id <>
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 -- "Tahoe" -- which does something similar:

I committed that change to Tahoe, and it was automatically tested on
eleven different systems by our buildbot:

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":

here is the one for the Ubuntu dapper machine -- "Ubuntu", "6.06":

and here is the result for my Ubuntu hardy workstation -- "Ubuntu", "8.04":
Date User Action Args
2008-09-23 17:39:45zookosetrecipients: + zooko, lemburg, georg.brandl, draghuram, christian.heimes, sapetnioc, benjamin.peterson, pavel.vinogradov, bgomes
2008-09-23 17:39:45zookosetmessageid: <>
2008-09-23 17:39:44zookolinkissue1322 messages
2008-09-23 17:39:44zookocreate