Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion src/installer/destinations.py
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,10 @@ def write_script(

def _compile_bytecode(self, scheme: Scheme, record: RecordEntry) -> None:
"""Compile bytecode for a single .py file."""
if scheme not in ("purelib", "platlib"):
if not self.bytecode_optimization_levels or scheme not in (
"purelib",
"platlib",
):
return

import compileall
Expand Down
Loading