Skip to content

Commit fbea70c

Browse files
Lazily import compileall (#226)
* Lazily import compileall * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
1 parent 501bdc2 commit fbea70c

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

CONTRIBUTING.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@ check if there is an existing issue already filed for the same, in the project's
1717
GitHub [issue tracker]. If not, please file a new issue.
1818

1919
If you want to help out by fixing bugs, choose an open issue in the [issue
20-
tracker] to work on and claim it by posting a comment saying "I would like to
21-
work on this.". Feel free to ask any doubts in the issue thread.
20+
tracker] to work on and claim it by posting a comment saying "I would like to work
21+
on this.". Feel free to ask any doubts in the issue thread.
2222

2323
While working on implementing the feature, please go ahead and file a pull
2424
request. Filing a pull request early allows for getting feedback as early as

src/installer/destinations.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
"""Handles all file writing and post-installation processing."""
22

3-
import compileall
43
import io
54
import os
65
from pathlib import Path
@@ -243,6 +242,8 @@ def _compile_bytecode(self, scheme: Scheme, record: RecordEntry) -> None:
243242
if scheme not in ("purelib", "platlib"):
244243
return
245244

245+
import compileall
246+
246247
target_path = self._path_with_destdir(scheme, record.path)
247248
dir_path_to_embed = os.path.dirname( # Without destdir
248249
os.path.join(self.scheme_dict[scheme], record.path)

0 commit comments

Comments
 (0)