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 christian.heimes
Recipients christian.heimes, draghuram, sapetnioc
Date 2007-10-30.12:03:55
SpamBayes Score 2.082417e-05
Marked as misclassified No
Message-id <47271DA8.4090004@cheimes.de>
In-reply-to <1193741374.29.0.884447620757.issue1322@psf.upfronthosting.co.za>
Content
Yann Cointepas wrote:
> I joined a modified version of platform.py. Here is a summary of the
> modification:
> - replaced '/etc' by global variable _etc_dir
> - removed supported_dists parameter of dist()
> - each element of dist() result is searched in the following places
>   (the first value found is kept):
>   1) First line of /etc/<distribname>-release
>   2) Contents of /etc/lsb-release
>   3) Extract <distribname> from /etc/<distribname>-release

Here is an updated patch against Python 2.5 (your file was based on
Python 2.5's platform.py, wasn't it?).

CHANGES:

 * Added unit tests
 * Add Lib/test/platform directory for unit tests
 * removed usage of string
 * minor cleanups

Now for the funny part. You have to port the patch to the svn trunk. The
file can't be altered in the 2.5 release cycle. The changes are too
great. Unfortunately the patch doesn't apply cleanly.

Please add more test data to the platform/ directory and test_platform.py

In order to build the trunk:
svn co http://svn.python.org/projects/python/trunk
cd trunk
./configure
make
patch -p0 < patchfile
./python Lib/test/test_platform.py
svn diff > patchfile

Christian
History
Date User Action Args
2007-10-30 12:03:56christian.heimessetspambayes_score: 2.08242e-05 -> 2.082417e-05
recipients: + christian.heimes, draghuram, sapetnioc
2007-10-30 12:03:56christian.heimeslinkissue1322 messages
2007-10-30 12:03:55christian.heimescreate