On Mon, 19 Oct 2009 13:46:11 +0200, Tarek Ziadé <[email protected]> wrote: > From the stdlib PoV, exposing new variables like "gnome" isn't > appropriate, because > we don't want to keep track of all desktop systems in the stdlib. > That's impossible.
Well, the list isn't infinite. And under Linux there are only two major ones existing in any great quantity unless I am mistaken. They are Gnome and KDE. The rest.. aren't so important for detection I would suggest.. ok - somebody stick a stake in my heart... haha > So exposing os.environ for your use case could help. I am not sure > about file presence though. As I said before.. I'm not so keen on that. > More generally, I feel uncomfurtable to give too much power in the > PKG-INFO syntax, I think > things like os.platform() are enough to describe conditional fields in > the metadata. > But what is the use case to detect gnome for the metadata fields ? Perphaps somebody is writing something that only works in gnome. The true rational is slightly different. Under windows there are distinct window manager versions. Eg XP, Vista, Windows 7, win-ce. They *do* have a big impact on python programs and change configurations significantly. So my rationale is simply to have the same thing under linux where there are two major desktops, KDE and GNOME. Maybe on the Mac there are differences to the python developer and we shouldn't forget those also. I'm proposing detecting less than 10 different desktops in all. And detecting those with two lines of code each. So 20 lines of code.. About 20 lines of new code shouldn't be so hard... I would have thought. David _______________________________________________ Distutils-SIG maillist - [email protected] http://mail.python.org/mailman/listinfo/distutils-sig
