svgui/pyjs/build.py
changeset 1742 92932cd370a4
parent 1741 dd94b9a68c61
child 1744 69dfdb26f600
equal deleted inserted replaced
1741:dd94b9a68c61 1742:92932cd370a4
    43 # usually defaults to e.g. /usr/share/pyjamas
    43 # usually defaults to e.g. /usr/share/pyjamas
    44 _data_dir = os.path.join(pyjs.prefix, "share/pyjamas")
    44 _data_dir = os.path.join(pyjs.prefix, "share/pyjamas")
    45 
    45 
    46 
    46 
    47 # .cache.html files produces look like this
    47 # .cache.html files produces look like this
    48 CACHE_HTML_PAT=re.compile('^[a-z]*.[0-9a-f]{32}\.cache\.html$')
    48 CACHE_HTML_PAT = re.compile('^[a-z]*.[0-9a-f]{32}\.cache\.html$')
    49 
    49 
    50 # ok these are the three "default" library directories, containing
    50 # ok these are the three "default" library directories, containing
    51 # the builtins (str, List, Dict, ord, round, len, range etc.)
    51 # the builtins (str, List, Dict, ord, round, len, range etc.)
    52 # the main pyjamas libraries (pyjamas.ui, pyjamas.Window etc.)
    52 # the main pyjamas libraries (pyjamas.ui, pyjamas.Window etc.)
    53 # and the contributed addons
    53 # and the contributed addons
   635     ordered_deps = []
   635     ordered_deps = []
   636     last_len = -1
   636     last_len = -1
   637     while deps:
   637     while deps:
   638         l_deps = len(deps)
   638         l_deps = len(deps)
   639         #print l_deps
   639         #print l_deps
   640         if l_deps==last_len:
   640         if l_deps == last_len:
   641             for m, dl in deps.items():
   641             for m, dl in deps.items():
   642                 for d in dl:
   642                 for d in dl:
   643                     if m in deps.get(d, []):
   643                     if m in deps.get(d, []):
   644                         raise Exception('Circular Imports found: \n%s %s -> %s %s'
   644                         raise Exception('Circular Imports found: \n%s %s -> %s %s'
   645                                         % (m, dl, d, deps[d]))
   645                                         % (m, dl, d, deps[d]))