Lines Matching refs:optimize
23 # 1) no compilation at all (--no-compile --no-optimize)
24 # 2) compile .pyc only (--compile --no-optimize; default)
25 # 3) compile .pyc and "opt-1" .pyc (--compile --optimize)
26 # 4) compile "opt-1" .pyc only (--no-compile --optimize)
27 # 5) compile .pyc and "opt-2" .pyc (--compile --optimize-more)
28 # 6) compile "opt-2" .pyc only (--no-compile --optimize-more)
30 # The UI for this is two options, 'compile' and 'optimize'.
32 # generate .pyc files. 'optimize' is three-way (0, 1, or 2), and
42 ('optimize=', 'O',
57 self.optimize = None
69 ('optimize', 'optimize'),
75 if self.optimize is None:
76 self.optimize = False
78 if not isinstance(self.optimize, int):
80 self.optimize = int(self.optimize)
81 if self.optimize not in (0, 1, 2):
84 raise DistutilsOptionError("optimize must be 0, 1, or 2")
132 byte_compile(files, optimize=0,
135 if self.optimize > 0:
136 byte_compile(files, optimize=self.optimize,
170 if self.optimize > 0:
172 py_file, optimization=self.optimize))