Changeset 527

Show
Ignore:
Timestamp:
Thu Aug 7 08:42:09 2008
Author:
htgoebel
Message:

Configure did not handle import level. Fixed.

Files:

Legend:

Unmodified
Added
Removed
Modified
  • trunk/buildtests/runtests.py

    r517 r527  
    142 142  
    143 143     if opts.clean:  
    144           # only clean up  
    145 144         clean()  
    146 145         raise SystemExit()  
     
    157 156         print "Running normal tests (-i for interactive tests)"  
    158 157  
    159       clean()  
      158     #clean()  
    159 158     runtests(tests, configfile=opts.configfile, run_executable=not opts.no_run)  
  • trunk/iu.py

    r526 r527  
    150 150  
    151 151         def getmod(self, nm, newmod=imp.new_module):  
      152             print 'zipimport', nm  
      153             #nm = _string_replace(nm, '.', '/')  
    152 154             try:  
    153                   return self.__zip.load_module(nm)  
      155                 mod = self.__zip.find_module(nm)  
      156                 if mod:  
      157                     print 'zipimport found', mod  
      158                 mod = imp.load_module(*mod)  
      159                 return mod  
    154 160             except zipimport.ZipImportError:  
    155 161                 return None  
     
    359 365         else: # level != 0  
    360 366             importernm = globals.get('__name__', '')  
      367             print 'importernm', importernm  
    361 368             if level < 0:  
    362 369                 # behaviour up to Python 2.4 (and default in Python 2.5)  
     
    398 405                     mod = _sys_modules_get(fqname, UNTRIED)  
    399 406                     if mod is UNTRIED:  
      407                         #print 'trying', nm, ctx, fqname  
    400 408                         mod = _self_doimport(nm, ctx, fqname)  
    401 409                 finally:  
     
    456 464                     subimporter = PathImportDirector(parent.__path__)  
    457 465                     importfunc = parent.__importsub__ = subimporter.getmod  
      466                 print importfunc  
    458 467                 mod = importfunc(nm)  
    459 468                 if mod and not reload:  
  • trunk/Configure.py

    r507 r527  
    239 239         mod = a.modules[nm]  
    240 240         tmp = []  
    241           for importednm, isdelayed, isconditional in mod.imports:  
      241         for importednm, isdelayed, isconditional, level in mod.imports:  
    241 241             if not isconditional:  
    242 242                 realnms = a.analyze_one(importednm, nm)