Merge pull request #11353 from kvuorine/fwknop-fixes
[feed/packages.git] / lang / python / python3 / patches-pip / 001-pep517-pyc-fix.patch
1 diff -Nurp a/pip/_vendor/pep517/wrappers.py b/pip/_vendor/pep517/wrappers.py
2 --- a/pip/_vendor/pep517/wrappers.py 2020-05-19 10:39:38.000000000 +0800
3 +++ b/pip/_vendor/pep517/wrappers.py 2020-06-30 20:19:05.495033208 +0800
4 @@ -14,11 +14,16 @@ try:
5 import importlib.resources as resources
6
7 def _in_proc_script_path():
8 - return resources.path(__package__, '_in_process.py')
9 + if resources.is_resource(__package__, '_in_process.py'):
10 + return resources.path(__package__, '_in_process.py')
11 + return resources.path(__package__, '_in_process.pyc')
12 except ImportError:
13 @contextmanager
14 def _in_proc_script_path():
15 - yield pjoin(dirname(abspath(__file__)), '_in_process.py')
16 + _in_proc_script = pjoin(dirname(abspath(__file__)), '_in_process.py')
17 + if not os.path.isfile(_in_proc_script):
18 + _in_proc_script = pjoin(dirname(abspath(__file__)), '_in_process.pyc')
19 + yield _in_proc_script
20
21
22 @contextmanager