Changeset 1238
- Timestamp:
- 04/20/07 01:55:01 (2 years ago)
- Files:
-
- gaphor/trunk/utils/command/build_uml.py (modified) (3 diffs)
- gaphor/trunk/utils/command/run.py (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
gaphor/trunk/utils/command/build_uml.py
r1140 r1238 30 30 31 31 def initialize_options(self): 32 self.build_lib = None32 #self.build_lib = None 33 33 self.force = 0 34 34 self.data_dir = None … … 36 36 def finalize_options(self): 37 37 self.set_undefined_options('build', 38 ('build_lib', 'build_lib'),38 #('build_lib', 'build_lib'), 39 39 ('force', 'force')) 40 40 41 41 def run(self): 42 42 import sys 43 sys.path.insert(0, self.build_lib)43 #sys.path.insert(0, self.build_lib) 44 44 self.generate_uml2() 45 45 … … 52 52 model = os.path.join('gaphor', 'UML', 'uml2.gaphor') 53 53 py_model = os.path.join('gaphor', 'UML', 'uml2.py') 54 outfile = os.path.join(self.build_lib, py_model)54 outfile = py_model #os.path.join(self.build_lib, py_model) 55 55 self.mkpath(os.path.dirname(outfile)) 56 56 if self.force or newer(model, outfile) \ gaphor/trunk/utils/command/run.py
r1140 r1238 5 5 import sys, os.path 6 6 from distutils.core import Command 7 7 from pkg_resources import load_entry_point 8 8 9 9 class run(Command): … … 42 42 for cmd_name in self.get_sub_commands(): 43 43 self.run_command(cmd_name) 44 if self.build_lib not in sys.path:45 sys.path.insert(0, self.build_lib)44 #if self.build_lib not in sys.path: 45 #sys.path.insert(0, self.build_lib) 46 46 47 47 import gaphor … … 66 66 # Prepend module's package path to sys.path 67 67 pkg = os.path.join(self.build_lib, *self.doctest.split('.')[:-1]) 68 if pkg:69 sys.path.insert(0, pkg)70 print 'Added', pkg, 'to sys.path'68 #if pkg: 69 # sys.path.insert(0, pkg) 70 # print 'Added', pkg, 'to sys.path' 71 71 # Load the module as local module (without package) 72 72 test_module = imp.load_source(self.doctest.split('.')[-1], f, fp) … … 100 100 dir, f = os.path.split(self.file) 101 101 print 'Extending PYTHONPATH with %s' % dir 102 sys.path.append(dir)102 #sys.path.append(dir) 103 103 execfile(self.file, {}) 104 104 else: 105 105 print 'Launching Gaphor...' 106 gaphor.main(self.model) 106 #gaphor.main(self.model) 107 load_entry_point('gaphor==0.10.5', 'console_scripts', 'gaphor')() 107 108 108 109 sub_commands = [('build', None)]
