OLD | NEW |
1 """SCons.Environment | 1 """SCons.Environment |
2 | 2 |
3 Base class for construction Environments. These are | 3 Base class for construction Environments. These are |
4 the primary objects used to communicate dependency and | 4 the primary objects used to communicate dependency and |
5 construction information to the build engine. | 5 construction information to the build engine. |
6 | 6 |
7 Keyword arguments supplied when the construction Environment | 7 Keyword arguments supplied when the construction Environment |
8 is created are construction variables used to initialize the | 8 is created are construction variables used to initialize the |
9 Environment | 9 Environment |
10 """ | 10 """ |
(...skipping 201 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
212 if source is _null: | 212 if source is _null: |
213 source = target | 213 source = target |
214 target = None | 214 target = None |
215 if not target is None and not SCons.Util.is_List(target): | 215 if not target is None and not SCons.Util.is_List(target): |
216 target = [target] | 216 target = [target] |
217 if not source is None and not SCons.Util.is_List(source): | 217 if not source is None and not SCons.Util.is_List(source): |
218 source = [source] | 218 source = [source] |
219 return apply(MethodWrapper.__call__, (self, target, source) + args, kw) | 219 return apply(MethodWrapper.__call__, (self, target, source) + args, kw) |
220 | 220 |
221 def __repr__(self): | 221 def __repr__(self): |
222 return '<BuilderWrapper %s>' % repr(self.name) | 222 fmt = '<BuilderWrapper %s instance at 0x%08X>' |
| 223 return fmt % (repr(self.name), id(self)) |
223 | 224 |
224 def __str__(self): | 225 def __str__(self): |
225 return self.__repr__() | 226 return self.__repr__() |
226 | 227 |
227 def __getattr__(self, name): | 228 def __getattr__(self, name): |
228 if name == 'env': | 229 if name == 'env': |
229 return self.object | 230 return self.object |
230 elif name == 'builder': | 231 elif name == 'builder': |
231 return self.method | 232 return self.method |
232 else: | 233 else: |
(...skipping 2010 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2243 nkw['gvars'] = {} | 2244 nkw['gvars'] = {} |
2244 self.raw_to_mode(nkw) | 2245 self.raw_to_mode(nkw) |
2245 return apply(SCons.Subst.scons_subst_list, nargs, nkw) | 2246 return apply(SCons.Subst.scons_subst_list, nargs, nkw) |
2246 def subst_target_source(self, string, *args, **kwargs): | 2247 def subst_target_source(self, string, *args, **kwargs): |
2247 nargs = (string, self,) + args | 2248 nargs = (string, self,) + args |
2248 nkw = kwargs.copy() | 2249 nkw = kwargs.copy() |
2249 nkw['gvars'] = {} | 2250 nkw['gvars'] = {} |
2250 self.raw_to_mode(nkw) | 2251 self.raw_to_mode(nkw) |
2251 return apply(SCons.Subst.scons_subst, nargs, nkw) | 2252 return apply(SCons.Subst.scons_subst, nargs, nkw) |
2252 return _NoSubstitutionProxy(subject) | 2253 return _NoSubstitutionProxy(subject) |
OLD | NEW |