Mercurial > gub
changeset 3389:cce22a1216f6
Oops, allow fully specified platforms.
author | Jan Nieuwenhuizen <janneke@gnu.org> |
---|---|
date | Wed, 02 May 2007 15:44:54 +0200 |
parents | 02234090a788 |
children | f8e3e3cb866c b7089fd3338b |
files | gub/cross.py |
diffstat | 1 files changed, 6 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/gub/cross.py Wed May 02 15:14:12 2007 +0200 +++ b/gub/cross.py Wed May 02 15:44:54 2007 +0200 @@ -140,10 +140,13 @@ return cross_module_cache[platform] import re + desc = ('.py', 'U', 1) + base = re.sub ('[-0-9].*', '', platform) - desc = ('.py', 'U', 1) - # FIXME: absolute path, should resolve in some way - file_name = 'gub/%s.py' % base + for name in base, platform: + file_name = 'gub/%(name)s.py' % locals () + if os.path.exists (file_name): + break file = open (file_name) print 'module-name: ' + file_name import imp