On Sun, Oct 18, 2009 at 12:00 AM, David Lyon <[email protected]> wrote: > 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
>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. So we have to work at providing tools for the developers in the conditions, for them to express them. So exposing os.environ for your use case could help. I am not sure about file presence though. 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. I can see a use case for building Extensions and package_data etc.. But what is the use case to detect gnome for the metadata fields ? Tarek _______________________________________________ Distutils-SIG maillist - [email protected] http://mail.python.org/mailman/listinfo/distutils-sig
