Christian Heimes added the comment:

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

__________________________________
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

Reply via email to