blob: b32733134ccc20f4ace8e2a5ad08952d6d19e1d4 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
--- a/src/pip/_vendor/pyproject_hooks/_in_process/__init__.py
+++ b/src/pip/_vendor/pyproject_hooks/_in_process/__init__.py
@@ -11,11 +11,17 @@ try:
except AttributeError:
# Python 3.8 compatibility
def _in_proc_script_path():
- return resources.path(__package__, "_in_process.py")
+ filename = "_in_process.pyc"
+ if resources.is_resource(__package__, "_in_process.py"):
+ filename = "_in_process.py"
+ return resources.path(__package__, filename)
else:
def _in_proc_script_path():
+ filename = "_in_process.pyc"
+ if resources.files(__package__).joinpath("_in_process.py").is_file():
+ filename = "_in_process.py"
return resources.as_file(
- resources.files(__package__).joinpath("_in_process.py")
+ resources.files(__package__).joinpath(filename)
)
|