[Distutils] [RFC] Recentering the static metadata need : PKG-INFO
david.lyon at preisshare.net
Sun Oct 18 00:00:51 CEST 2009
On Sat, 17 Oct 2009 18:19:44 +0200, Tarek Ziadé <ziade.tarek at gmail.com>
> If you can find a way to express conditions based on os.environ,
> maybe os.environ could be added to the variables that are used
> when checking the markers on a given platform.
I'm not sure that you should try to do that. It would make things
too complicated for the developer. I'm not sure that they would
like to guess environment variables at an end-users system.
It's different if the api does it internally. The developer then
doesn't see how the check for kde or gnome is actually performed.
> e.g. like = 'KDEDIR' in os.environ (so meaning we introduce sequence
> in those markers)
I suggest that you just add a variable for 'desktop' or something
to your pep and allow them to check for that. I've told you an
easy way to check (environment variables) so there's no reason
you couldn't do it the same way.
> Do you have an example for a platform that would depend on a
> configuration file ?
What I meant there was that desktops such as gnome or kde or flux
or others can also be detected internally by the presence of their
configuration files on linux.
For example, if there is a /etc/gdm/gdm.conf it is pretty safe
to assume that gnome is installed on that system.
So in your PEP, your could have code..
if sys.platform == 'linux2':
gnome_installed = os.path.exists('/etc/gdm/gdm.conf')
Then exposed that as a variable in your condition:
'if desktop in "gnome|windows"' etc
More information about the Distutils-SIG