Lines Matching refs:option

19     two is necessary because option values might come from the outside
78 # Some commands define a 'self.force' option to ignore file
118 # (command-line, option file, etc.) has been processed
121 # controlled by the command's various option values
138 This is always called as late as possible, ie. after any option
140 done. Thus, this is the place to code option dependencies: if
157 for (option, _, _) in self.user_options:
158 option = option.translate(longopt_xlate)
159 if option[-1] == "=":
160 option = option[:-1]
161 value = getattr(self, option)
162 self.announce(indent + "%s = %s" % (option, value),
197 # NB. the general philosophy here is to ensure that a particular option
201 # option into conformance, raise DistutilsOptionError. Thus, command
207 def _ensure_stringlike(self, option, what, default=None):
208 val = getattr(self, option)
210 setattr(self, option, default)
214 % (option, what, val))
217 def ensure_string(self, option, default=None):
218 """Ensure that 'option' is a string; if not defined, set it to
221 self._ensure_stringlike(option, "string", default)
223 def ensure_string_list(self, option):
224 r"""Ensure that 'option' is a list of strings. If 'option' is
229 val = getattr(self, option)
233 setattr(self, option, re.split(r',\s*|\s+', val))
242 % (option, val))
244 def _ensure_tested_string(self, option, tester, what, error_fmt,
246 val = self._ensure_stringlike(option, what, default)
248 raise DistutilsOptionError(("error in '%s' option: " + error_fmt)
249 % (option, val))
251 def ensure_filename(self, option):
252 """Ensure that 'option' is the name of an existing file."""
253 self._ensure_tested_string(option, os.path.isfile,
257 def ensure_dirname(self, option):
258 self._ensure_tested_string(option, os.path.isdir,
273 option values in some other command object. "Undefined" here means
274 "is None", which is the convention used to indicate that an option
278 option of the same command. 'src_cmd' is the other command from
279 which option values will be taken (a command object will be created