Lines 24-31
class install_lib(Command):
Link Here
|
24 |
# 2) compile .pyc only (--compile --no-optimize; default) |
24 |
# 2) compile .pyc only (--compile --no-optimize; default) |
25 |
# 3) compile .pyc and "opt-1" .pyc (--compile --optimize) |
25 |
# 3) compile .pyc and "opt-1" .pyc (--compile --optimize) |
26 |
# 4) compile "opt-1" .pyc only (--no-compile --optimize) |
26 |
# 4) compile "opt-1" .pyc only (--no-compile --optimize) |
27 |
# 5) compile .pyc and "opt-2" .pyc (--compile --optimize-more) |
27 |
# 5) compile .pyc, "opt-1" and "opt-2" .pyc (--compile --optimize-more) |
28 |
# 6) compile "opt-2" .pyc only (--no-compile --optimize-more) |
28 |
# 6) compile "opt-1" and "opt-2" .pyc (--no-compile --optimize-more) |
29 |
# |
29 |
# |
30 |
# The UI for this is two options, 'compile' and 'optimize'. |
30 |
# The UI for this is two options, 'compile' and 'optimize'. |
31 |
# 'compile' is strictly boolean, and only decides whether to |
31 |
# 'compile' is strictly boolean, and only decides whether to |
Lines 132-139
class install_lib(Command):
Link Here
|
132 |
byte_compile(files, optimize=0, |
132 |
byte_compile(files, optimize=0, |
133 |
force=self.force, prefix=install_root, |
133 |
force=self.force, prefix=install_root, |
134 |
dry_run=self.dry_run) |
134 |
dry_run=self.dry_run) |
135 |
if self.optimize > 0: |
135 |
for opt in range(1, self.optimize + 1): |
136 |
byte_compile(files, optimize=self.optimize, |
136 |
byte_compile(files, optimize=opt, |
137 |
force=self.force, prefix=install_root, |
137 |
force=self.force, prefix=install_root, |
138 |
verbose=self.verbose, dry_run=self.dry_run) |
138 |
verbose=self.verbose, dry_run=self.dry_run) |
139 |
|
139 |
|
Lines 167-175
class install_lib(Command):
Link Here
|
167 |
if self.compile: |
167 |
if self.compile: |
168 |
bytecode_files.append(importlib.util.cache_from_source( |
168 |
bytecode_files.append(importlib.util.cache_from_source( |
169 |
py_file, optimization='')) |
169 |
py_file, optimization='')) |
170 |
if self.optimize > 0: |
170 |
for opt in range(1, self.optimize + 1): |
171 |
bytecode_files.append(importlib.util.cache_from_source( |
171 |
bytecode_files.append(importlib.util.cache_from_source( |
172 |
py_file, optimization=self.optimize)) |
172 |
py_file, optimization=opt)) |
173 |
|
173 |
|
174 |
return bytecode_files |
174 |
return bytecode_files |
175 |
|
175 |
|
176 |
- |
|
|