Changeset 2136

Show
Ignore:
Timestamp:
09/19/07 23:42:03 (1 year ago)
Author:
arj..@yirdis.nl
Message:

Fix [81]. A new release 0.12.4 is available from the Python cheeseshop.

Files:

Legend:

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

    r2132 r2136  
    2828 
    2929LINGUAS = [ 'ca', 'es', 'nl', 'sv' ] 
     30 
     31# Wrap setuptools' build_py command, so we're sure build_uml is performed 
     32# before the build_py code. 
     33 
     34from setuptools.command.build_py import build_py 
     35 
     36class build_py_with_sub_commands(build_py): 
     37 
     38    def run(self): 
     39        for cmd_name in self.get_sub_commands(): 
     40            self.run_command(cmd_name) 
     41 
     42        build_py.run(self) 
     43     
     44build_py_with_sub_commands.sub_commands.append(('build_uml', None)) 
     45 
    3046 
    3147class build_doc(Command): 
     
    6985 
    7086 
    71 #if sys.platform == 'darwin': 
    72 #    # Mac OS X 
    73 #    import pkg_resources 
    74 #    pkg_resources.require('zope.component') 
    75 #    platform_setup_requires=['py2app'] 
    76 #    platform_setup = dict( 
    77 #        app=['gaphor-osx.py'], 
    78 #        ) 
    79 #else: 
    80 platform_setup_requires = [] 
    81 platform_setup = dict() 
     87if sys.platform == 'darwin' and 'py2app' in sys.argv: 
     88    # Mac OS X 
     89    import pkg_resources 
     90    pkg_resources.require('zope.component') 
     91    platform_setup_requires=['py2app'] 
     92    platform_setup = dict( 
     93        app=['gaphor-osx.py'], 
     94        ) 
     95elif sys.platform == 'win32' and 'py2exe' in sys.argv: 
     96    # Windows 
     97    import py2exe 
     98    platform_setup_requires = ['py2exe'] 
     99    platform_setup= { 'app': ['gaphor'], } 
     100 
     101    import pkg_resources 
     102    eggs = pkg_resources.require("gaphor") 
     103    for egg in eggs: 
     104       if os.path.isdir(egg.location): 
     105           sys.path.insert(0, egg.location) 
     106           continue 
     107       else: 
     108           print 'Can only handle unpacked eggs.' 
     109    egg_names = [] 
     110    for egg in eggs: 
     111        egg_names.append(egg.project_name) 
     112else: 
     113    platform_setup_requires = [] 
     114    platform_setup = dict() 
    82115 
    83116 
     
    161194 
    162195    cmdclass = { 
     196              'build_py': build_py_with_sub_commands, 
    163197              'build_uml': build_uml, 
    164198              'build_mo': build_mo, 
     
    184218                ) 
    185219        ), 
     220        py2exe = dict( 
     221            packages='gaphas, decorator', 
     222            includes='cairo, pango, pangocairo, atk', 
     223        ), 
     224         
    186225        build_pot = dict( 
    187226            all_linguas = ','.join(LINGUAS), 
  • gaphor/trunk/utils/command/build_uml.py

    r2115 r2136  
    6161 
    6262 
    63 # Wrap setuptools' build_py command, so we're sure build_uml is performed 
    64 # before the build_py code. 
    65  
    66 from setuptools.command.build_py import build_py 
    67  
    68 def build_py_run(self, run=build_py.run): 
    69     for cmd_name in self.get_sub_commands(): 
    70         self.run_command(cmd_name) 
    71  
    72     run(self) 
    73      
    74 build_py.run = build_py_run 
    75  
    76 build_py.sub_commands.append(('build_uml', None)) 
    77  
    7863# vim:sw=4:et