blob: e9eafab969dacb399efe4d6c7d096cf13c0b49de [file] [log] [blame]
b.liue9582032025-04-17 19:18:16 +08001--- a/src/pip/_vendor/pyproject_hooks/_in_process/__init__.py
2+++ b/src/pip/_vendor/pyproject_hooks/_in_process/__init__.py
3@@ -11,8 +11,14 @@ try:
4 except AttributeError:
5 # Python 3.8 compatibility
6 def _in_proc_script_path():
7- return resources.path(__package__, '_in_process.py')
8+ filename = '_in_process.pyc'
9+ if resources.is_resource(__package__, '_in_process.py'):
10+ filename = '_in_process.py'
11+ return resources.path(__package__, filename)
12 else:
13 def _in_proc_script_path():
14+ filename = '_in_process.pyc'
15+ if resources.files(__package__).joinpath('_in_process.py').is_file():
16+ filename = '_in_process.py'
17 return resources.as_file(
18- resources.files(__package__).joinpath('_in_process.py'))
19+ resources.files(__package__).joinpath(filename))