On Sat, 17 Oct 2009 01:15:25 +0200, Tarek Ziadé <ziade.tarek@gmail.com> wrote:
On Sat, Oct 17, 2009 at 12:39 AM, David Lyon <david.lyon@preisshare.net> wrote:
 Requires: (linux-suse-kde-64) foo
How this expression would be verified on the target system ?
I'm working on coding it. Basically the strings are a in a list. # -- These strings describe different platforms standard_platform_bits = ('windows','linux','mac', 'xp','vista', 'os/x', '32','64', 'kde','gnome', 'wx', 'ubuntu','debian','suse','redhat','gentoo', 'centos','symbian' ) Then they go into a dictionary: platform_bits = {'windows' = False, 'linux' = False, 'mac' = False, 'xp' = False, 'vista' = False, 'os/x' = False, '32' = False, '64' = False, 'kde' = False, 'gnome' = False, 'wx' = False, 'gtk' = False, 'ubuntu' = False, 'debian' = False, 'suse' = False, 'redhat' = False, 'gentoo' = False, 'centos' = False, 'symbian = False' } # -- See what our platform is def build_platform_bit_map(): if sys.platform == 'darwin': self.platform_bits['mac'] = True # -- Further sub-bit determination .. else if sys.platform == 'win32': self.platform_bits['windows'] = True # -- Further sub-bit determination .. else if sys.platform == 'linux2': # -- Further sub-bit determination .. I'm working on the rest. David