Changeset 899

Show
Ignore:
Timestamp:
05/29/06 05:49:01 (3 years ago)
Author:
arjanmol
Message:

--

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/gaphor/setup.py

    r898 r899  
    1818from glob import glob 
    1919from commands import getoutput, getstatus, getstatusoutput 
    20 import py2app 
     20try: 
     21    import py2app 
     22except ImportError: 
     23    print 'No py2app..' 
     24 
    2125from distutils.core import setup, Command 
    2226from distutils.command.build_py import build_py 
     
    189193        outfile = os.path.join(self.build_lib, py_model) 
    190194        self.mkpath(os.path.dirname(outfile)) 
    191         if self.force or newer(model, outfile) \ 
    192                       or newer(overrides, outfile) \ 
    193                       or newer(gen, outfile): 
     195 
     196        # Figure out if the uml2.py (outfile) is the newest or should be 
     197        # generated (again). 
     198        if self.force or reduce(lambda a, b: newer(a,b) and a or b, 
     199                                (model, overrides, gen, outfile)) != outfile: 
    194200            print 'generating %s from %s...' % (py_model, model) 
    195201            print '  (warnings can be ignored)'