[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: output of sys.platform changed



Yes, that is what came to my mind too. So, ideally for a FreeBSD 5.x kernel it
should show gnukfreebsd5 and for a FreeBSD 6.x kernel it should show
gnukfreebsd6.

But on my system, where uname -a reports 5.4-1-486, the output from sys.platform
is gnukfreebsd6.
Which means the sys.platform output is being taken from somewhere else.

My guess is that it is taken from an binary from python-2.4 package
and represents kernel version at time of build.

from buildd log
http://experimental.ftbfs.de/build.php?&pkg=python2.4&ver=2.4.4-2&arch=kfreebsd-i386&file=log:

"gcc -pthread -c -fno-strict-aliasing -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -I. -I../Include -DPy_BUILD_CORE -DPLATFORM='"gnukfr
eebsd6"' -o Python/getplatform.o ../Python/getplatform.c"


There might be a good reason behind that. Even for Linux systems the output of
sys.platform is linux2. I think sys.platform is caring only about the major
releases (though in linux major releases are 2.X)

And even if that's the (correct) case, sys.platform should output gnukfreebsd5
for a 5.x FreeBSD kernel installed.

It looks like sys.platform is compile time detected, not runtime detected.

I also verified the installed FreeBSD kernel on my system and it says is
kfreebsd-image-5.4-1-486 5.4-21. I don't see any FreeBSD 6.x series kernel
image or utility installed on my box.

Well, you should consider upgrade to 6.2 kernel ;-)

Petr



Reply to: