Changeset 2136
- Timestamp:
- 09/19/07 23:42:03 (1 year ago)
- Files:
-
- gaphor/trunk/setup.py (modified) (4 diffs)
- gaphor/trunk/utils/command/build_uml.py (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
gaphor/trunk/setup.py
r2132 r2136 28 28 29 29 LINGUAS = [ '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 34 from setuptools.command.build_py import build_py 35 36 class 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 44 build_py_with_sub_commands.sub_commands.append(('build_uml', None)) 45 30 46 31 47 class build_doc(Command): … … 69 85 70 86 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() 87 if 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 ) 95 elif 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) 112 else: 113 platform_setup_requires = [] 114 platform_setup = dict() 82 115 83 116 … … 161 194 162 195 cmdclass = { 196 'build_py': build_py_with_sub_commands, 163 197 'build_uml': build_uml, 164 198 'build_mo': build_mo, … … 184 218 ) 185 219 ), 220 py2exe = dict( 221 packages='gaphas, decorator', 222 includes='cairo, pango, pangocairo, atk', 223 ), 224 186 225 build_pot = dict( 187 226 all_linguas = ','.join(LINGUAS), gaphor/trunk/utils/command/build_uml.py
r2115 r2136 61 61 62 62 63 # Wrap setuptools' build_py command, so we're sure build_uml is performed64 # before the build_py code.65 66 from setuptools.command.build_py import build_py67 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_run75 76 build_py.sub_commands.append(('build_uml', None))77 78 63 # vim:sw=4:et
